diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2014-08-21 21:37:55 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2014-08-21 21:37:55 -0700 |
commit | 734e8c28241e95f7425a18d8791b35ff5e98f7db (patch) | |
tree | 145af12466512661ec06bb8099f5720ee68be241 | |
parent | 6da81a3e4a64d404141c0bf0b77126860fbe0f50 (diff) | |
download | mu-734e8c28241e95f7425a18d8791b35ff5e98f7db.tar.gz |
69
-rw-r--r-- | mu.arc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mu.arc b/mu.arc index 4029ab20..8658c7fb 100644 --- a/mu.arc +++ b/mu.arc @@ -5,6 +5,14 @@ (each f (as cons initialization-fns*) (f))) +(mac init-fn (name . body) + `(enq (fn () (= (function* ',name) ',body)) + initialization-fns*)) + +(mac on-init body + `(enq (fn () (run ',body)) + initialization-fns*)) + (def clear () (= types* (obj ; must be scalar or array, sum or product or primitive @@ -26,14 +34,6 @@ (= function* (table))) (enq clear initialization-fns*) -(mac init-fn (name . body) - `(enq (fn () (= (function* ',name) ',body)) - initialization-fns*)) - -(mac on-init body - `(enq (fn () (run ',body)) - initialization-fns*)) - (def add-fns (fns) (each (name . body) fns (= function*.name body))) |