Yes, this is expected behavior because the scope in which the interactive interpreter runs commands changes with each line. In your example, on the second line, add was nil. If you seperated the lines with a comma, it would work:
>> add = (x, y): x + y., add(2, 4) string print
6=> nil
On both OpenBSD amd64 and Snow Leopard I get the following.
Is this expect behavior? I would think I would get 6 returned. All tests pass when I run make test yet calling a simple function doesn't?
The text was updated successfully, but these errors were encountered: