Closed sourcevault closed 6 years ago
That's correct. This is an error. LiveScript has no tuples.
I am trying to do a normal function call like so :
f a,b # no error
Welcome to LiveScript! It's true, f (a, b)
is not valid and is not intended to be so. LiveScript is a very whitespace-sensitive language. For example, there is a big difference between a[b, c]
and a [b, c]
—the former will compile to [a[b], a[c]]
, while the latter will compile to a([b, c])
. By analogy, f (a, b)
would mean to apply f
to whatever (a, b)
means, but as ven observes, the expression (a, b)
doesn't mean anything in LiveScript, so this is an error, whereas f(a, b)
is valid (as is f a, b
, as you observe).
I was quite surprised that this caused parse error :|