From 438c00fd1fadf5ac1240f33b809afa9a5c9af9bf Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 26 Jul 2021 01:21:46 -0700 Subject: . --- shell/data.limg | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- cgit 1.4.1-2-gfad0