From: Andrew Bistak Subject: Natural Numbers in LISP Date: Message-ID: <3rj6vf$ons@nyx10.cs.du.edu>
How do I represent natural numbers in LISP. Wheres as an empty list, nil represents the number 0 and the list (1) respresents the number 1. i.e. >(SUM (1)) (1) >(SUM (1 1 1 1) (1 1) (1)) (1 1 1 1 1 1 1) OR divide >(DIVIDE (1 1 1) (1)) (1 1 1) This has really got me stooped! Any help would be much appreciated. regards