basic, but I don't understand

You have problems, and we're glad to hear them. Explain the problem, what you have tried, and where you got stuck.
Feel free to share a little info on yourself and the course.
Forum rules
Please respect your teacher's guidelines. Homework is a learning tool. If we just post answers, we aren't actually helping. When you post questions, be sure to show what you have tried or what you don't understand.

basic, but I don't understand

Postby HomuciferMadokami » Tue Nov 26, 2013 7:24 am

Code: Select all
(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)
HomuciferMadokami
 
Posts: 2
Joined: Tue Nov 26, 2013 7:20 am

Re: basic, but I don't understand

Postby sylwester » Thu Nov 28, 2013 4:17 pm

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
sylwester
 
Posts: 82
Joined: Mon Jul 11, 2011 2:53 pm


Return to Homework

Who is online

Users browsing this forum: No registered users and 1 guest