Mariano Guerra
unread,Nov 14, 2012, 4:35:52 AM11/14/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to kl...@googlegroups.com
section 5.9.1 in the specification says:
"lists must be a nonempty list of lists; if there are two or more, they must all have
the same length"
trying on klisp:
klisp> (map ($lambda (a) (+ a 1)) (list 1 2 3 4 5))
(2 3 4 5 6)
klisp> (map ($lambda (a) (+ a 1)) (list (list 1 2 3 4 5) (list 6 7 8 9 10)))
*ERROR*:
+: bad operand type
Location: #[operative: + @ kgnumbers.c (line: 2533, col: 0)]
Backtrace:
#[continuation (map-acyclic-part) @ *STDIN* (line: 1, col: 1)]
#[continuation (map-ret) @ *STDIN* (line: 1, col: 1)]
#[continuation (repl-print-loop) @ *STDIN* (line: 1, col: 1)]
#[continuation (pass-value) @ *STDIN* (line: 1, col: 1)]
#[continuation (pass-value) @ *STDIN* (line: 1, col: 1)]
#[continuation: root-continuation (exit) @ kstate.c (line: 275, col: 0)]
klisp> (map ($lambda (a) (+ a 1)) (list 1 2 3 4 5) (list 6 7 8 9 10))
*ERROR*:
?: ptree doesn't match arguments
Location: #[operative @ *STDIN* (line: 1, col: 6)]
Backtrace:
#[continuation (map-acyclic-part) @ *STDIN* (line: 1, col: 1)]
#[continuation (map-ret) @ *STDIN* (line: 1, col: 1)]
#[continuation (repl-print-loop) @ *STDIN* (line: 1, col: 1)]
#[continuation (pass-value)]
#[continuation (pass-value)]
#[continuation: root-continuation (exit) @ kstate.c (line: 275, col: 0)]
it seems it only accepts one list, am I doing something wrong?