Can compile functions depending on other top level functions and values

This commit is contained in:
Nathan Braswell
2020-04-17 10:31:38 -04:00
parent bed1871ad3
commit cc833015c3
2 changed files with 57 additions and 63 deletions

6
bf.kp
View File

@@ -61,8 +61,10 @@
;(def! main (fn* [] ((fn* [] (+ (+ 1 2) 3)) 13 1 2)))
;(def! main (fn* [] (((fn* [] (fn* [] 1))))))
;(def! main (fn* [] ((fn* [a b c] (- (+ a b) c)) 13 1 4)))
(def! main (fn* [] (fn* [] 1)))
;(def! main (fn* [] (fn* [] 1)))
;(def! other (fn* [a b c] (- (+ a b) c)))
;(def! main (fn* [] (other 13 1 4)))
(def! other 12)
(def! main (fn* [] (+ other 4)))