Page 1 of 1

functions in common lisp

Posted: Sun Oct 07, 2012 11:01 pm
by mwandi
is there a way i can write a function P (n) such that for any integer n there is a list of three elements, namely the square, cube, and fourth power of n????
i am trying to learn functions and i was looking at a certain book and i saw this question any ideas?

Re: functions in common lisp

Posted: Mon Oct 08, 2012 5:03 pm
by nuntius
Yes, this is quite doable. Please see one of the excellent free books in our FAQ for an introduction to the language.