5 ms·
I also played with the same idea some time ago: https://github.com/akalenuk/fakelisp https://github.com/akalenuk/fakelisp I ended up using tuples instead of li
by okaleniuk 2y ago
I also played with the same idea some time ago: https://github.com/akalenuk/fakelisp https://github.com/akalenuk/fakelisp
I ended up using tuples instead of lists for cosmetic purposes :-) My Fakelisp then looks like this:
from fakelisp import *
# And now you can start mixing Python and LISP
X = (BEGIN
(SET (F) (LAMBDA (X)
(IF (EQ (X) (1))
(1)
(MUL (X) (F (SUB (X) (1)))))))
(LIST (F (4)) (42)))
# Back to Python any time
print "x: ", str(X)
- Galanwe 2y agoJust curious, how did you manage to get that syntax? If it's tuples, then how did you get rid of the commas? If it's functions, how do you get rid of parens around scalars?