(no title)
asrp | 5 years ago
foo bar baz
will call the 3 functions in orderfoo() bar() baz()
All functions are nullary (with side effects; these side effects determine their "true" arity). There aren't really any special characters other than whitespace so
1 1 + print
just translates to 1()
1()
+()
print()
Function names do not have to start with a letter or be alphanumeric. I've happened to name my function so that those ending in a colon treats the next token to the right as a string instead of a function call. The [ function treats everything as strings until ] (that is a single close square bracket as a token) and puts the function in those body in a quote, effectively creating an anonymous function. So[ foo bar baz ] bind: somename
defines a function. The equivalent in Python would be
def somename():
foo()
bar()
baz()
And you can later call somename in later functions.
No comments yet.