@chunes That's a macro (macros are lists with three elements; functions have two). Also, disp only takes one argument and you've given it two, (q a) and (f).
@Razetime You're on the right track! Try making the function variadic.
> A function is a list of two items. The first is either a list of parameter names, or a single name which will receive a list of any arguments passed to the function (thus allowing for variable-arity functions).
@chunes ...aaand it turns out that the official implementation assumes that any list starting with () is trying to be a macro, so you actually can't write a parameterless function. But you can write a variadic function and pass it 0 parameters.
that highlighter will actually be really helpful for me, thanks
Oh, yesterday I was trying to figure out how to (d things inside functions and then refer to them later in the function but couldn't get it to work. Can it work?
@Razetime I don't know Haskell well enough to claim I understand monads, but I tried to do maybe something in that direction with Appleseed, but with an event-driven model. It just ended up being clunky and annoying.
@chunes I think not--anyway, it's not supposed to. But I can't say for 100% sure that it actually doesn't. Let me try something...
@chunes Yes. s is the one math builtin atop which the entire library is constructed. (Though a is also a builtin because I got tired of writing (s X (s 0 Y)) to add two numbers.)
@Razetime join won't work with an empty list, it has to be an empty name (string ())
Oh, also, -265 is not an integer literal, it's a name. Use (neg 265) instead.
I take it back, joindoes work with an empty list, sort of: it calls chars, which should return nil if it's passed an empty name; when it's passed a list it errors... and returns nil.
Update: the syntax highlighter now adds implicit parentheses, indicates matching parentheses and the content between them, and highlights unmatched close-parens in red.