20 lines
371 B
Fennel
20 lines
371 B
Fennel
(local fennel (require :fennel))
|
|
(import-macros {: def : q : ttype : static : printform} :terra)
|
|
|
|
(print "define do-thing")
|
|
(fn do-thing [f x]
|
|
(printform
|
|
(q (var z (+ x 1))
|
|
(f z)
|
|
($)))
|
|
)
|
|
|
|
(print "define thing-doer")
|
|
(local thing-doer (def [x int] (return)))
|
|
; (print thing-doer)
|
|
; (printform
|
|
(def []
|
|
(var z 10)
|
|
,(do-thing thing-doer `z))
|
|
; )
|
|
nil |