1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 11:09:54 +00:00
janet/sample.gst

13 lines
218 B
Plaintext
Raw Normal View History

2017-03-08 15:54:50 +00:00
(do
2017-03-12 22:23:27 +00:00
(:= a (set-class {} {"call" (fn [self a] (set self "last" a) (print self) self)}))
(a 1)
(a 2)
(a 3)
2017-03-08 15:54:50 +00:00
)
# Run call-for-each test
(call-for-each print 1 2 3 4)
(call-for-each (fn [a] (print a "hi")) 1 2 3 45)