Revision fb16c3ae244436a905aa7df3f7b449b584f3c814 authored by Barak A. Pearlmutter on 19 October 2019, 16:25:11 UTC, committed by Barak A. Pearlmutter on 22 July 2020, 19:36:14 UTC
1 parent 01d5226
case
;;; -*- logo -*-
.macro case :case.value :case.clauses [:caseignoredp "true]
catch "case.error [output case.helper :case.value :case.clauses]
(throw "error [Empty CASE clause])
end
to case.helper :case.value :case.clauses
if emptyp :case.clauses [output []]
if emptyp first :case.clauses [throw "case.error]
if or equalp first first :case.clauses "else ~
memberp :case.value first first :case.clauses ~
[output butfirst first :case.clauses]
output case.helper :case.value butfirst :case.clauses
end
bury [case case.helper]
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...