One recurring complaint is that nobody talks about code on /prog/. So everyone write go and write some code, any code, that does something, anything, and post it. A small explanation wouldn't go amiss either.
Name:
Anonymous2011-03-05 23:38
Tried my first bit of lisp just now; googled the syntax for ifs and functions then wrote this.. (defun factorial (num) (if (> num 1) (* num (factorial (- num 1))) 1))
Should probably work on my formatting, just don't really know the normal style for lisp. I imagine it's something like.. (defun factorial (num)
(if (> num 1)
(* num (factorial
(- num 1)))
1))
Name:
Anonymous2011-03-05 23:45
>>35 (defun factorial (num)
(if (> num 1)
(* num (factorial (- num 1)))
1
)
)