diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-07-26 01:21:46 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-07-26 01:21:46 -0700 |
commit | 438c00fd1fadf5ac1240f33b809afa9a5c9af9bf (patch) | |
tree | 6af92256026d86e9f7f8c5d065d5c4e8a5b544a6 /shell | |
parent | ef637b6baba763ea3b76a06ec34babb9ee08d2cd (diff) | |
download | mu-438c00fd1fadf5ac1240f33b809afa9a5c9af9bf.tar.gz |
.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/data.limg | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/shell/data.limg b/shell/data.limg index b0fc60c0..8578d95a 100644 --- a/shell/data.limg +++ b/shell/data.limg @@ -17,6 +17,8 @@ (if ,var ,then ,else))]) (aif . [mac (aif expr then else) `(iflet it ,expr ,then ,else)]) + (forever . [mac (forever . body) + `(while 1 ,@body)]) (list . [def (list . args) # we should probably make a copy here args]) @@ -64,6 +66,10 @@ (list (list (car xs))) (cons (list (car xs) (cadr xs)) (pair (cddr xs)))]) + (grid . [def (grid m n val) + ret g (populate n ()) + for i 0 (< i n) ++i + iset g i (populate m val)]) (with . [mac (with bindings . body) `((fn ,(map1 car (pair bindings)) ,@body) |