This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

basic, but I don't understand

2 posts · 3937 views

(defun op(n)
	(nth (mod n 3) '(+ - *))
)
(defun pre-op(n)
	(nth (mod n 4) '(sqrt sin log))
)
(defun const(n)
	(nth (mod n 11) '(0.1 1 2 3 4 5 6 7 8 9))
)
((op 0) 3 2)
so I have that code, and I'm expecting the
so uh, how to make the ((op 0) 3 2)
become (+ 3 2)

Re: basic, but I don't understand

This is a double post. I've answered this thread!
I'm the author of two useless languages that uses BF as target machine.
Currently I'm planning a Scheme compiler :p