rumlang / rum

Functional language, easily extensible and possible (Lua features with LISP dialect and functional) to be embarked on software Go!
https://www.rumlang.org/
MIT License
157 stars 13 forks source link

Code with multiple lines in the REPL tool. #120

Closed crgimenes closed 6 years ago

crgimenes commented 6 years ago

Count the parentheses and only execute the code if the number of open and closed parentheses is the same. ^C cancel all lines and return to main prompt.

>>> (let factorial 
-->     (lambda (n) 
-->       (if (== n 0) 
-->           1 
-->           (* n (factorial (- n 1))))))
0x1111020
>>> (factorial 10)
3628800