-
Notifications
You must be signed in to change notification settings - Fork 4
lib
Turtle Kitty edited this page Oct 6, 2015
·
3 revisions
This defines the function that will be called when the program is imported as a module.
It can accept arguments and options just like any other function.
It can return any value. The return value will be the value of the (load ...) expression that imported the module.
; foo.sxy
(lib (x y)
(list x y 5))
; bar.sxy
(use fooner (load "foo.sxy" 2 3)) -> (2 3 5)
(fooner.map (_ (* _ 2))) -> (4 6 10)