Post Reply 
[SOLVED] DSRN (dog slow roman numerals)
06-15-2014, 04:30 AM
Post: #31
RE: DSRN (dog slow roman numerals)
(06-15-2014 01:22 AM)Claudio L. Wrote:  I found that behavior when implementing \GSLIST and it didn't make any sense.

Look at it as: \<< + \>> STREAM
What happens when you execute + with only one number on the stack?
Error: Too Few Arguments

Quote:The sum of an empty list should give an error, but a list with one element has a clear result.

Or then the sum of an empty list is 0 as in Lisp.
And the product of an empty list is 1.
Code:
 > (+ 3 4)
=> 7
 > (+ 3)
=> 3
 > (+)
=> 0
 > (* 3 4)
=> 12
 > (* 3)
=> 3
 > (*)
=> 1

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: DSRN (dog slow roman numerals) - HP67 - 06-11-2014, 07:06 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 11:44 AM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 04:49 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-15-2014, 12:02 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-16-2014, 06:09 AM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 05:46 PM
RE: DSRN (dog slow roman numerals) - Thomas Klemm - 06-15-2014 04:30 AM



User(s) browsing this thread: 6 Guest(s)