Symta can, but (display toaster) requires defining toaster through mexlet, which, just like symbol-macrolet in Common Lisp, defines local syntatic constant: toaster @Xs = case Xs [_ X] | 'toasted something' [_] | 'toasted nothing'
export \toaster ...
mexlet toaster 'this is a toaster' | say toaster | say: toaster | say: toaster a
Name:
Anonymous2018-01-14 8:05
>>15 Here is how mexlet used in real Symta code to define C++ style for-loop: expand_loop Head Post Body = | L = @rand l | Post = if got Post then [Post] else [] | Break = [] | when Body^has_head{pass}: | Pass = @rand pass | Body <= [mexlet [pass] [_goto Pass] Body] | push [_label Pass] Post | when Body^has_head{done}: | Done = @rand done | Body <= [mexlet [done] [_goto Done] Body] | push [_label Done] Break | [_progn [_label L] [_if Head [_progn Body @Post [_goto L]] No] @Break]
for @As = case As [Item Items Body] | expand_map_for times Item Items Body [[`;` Entry Cond Post] Body] | ['|' Entry (expand_loop Cond Post Body)] Else | mex_error "`for` has bad syntax [As]"