Re:Kilo LISP
by weeber on Tuesday March 19, 2019 @06:25PM
(#19436697)
ok, but why 2 * 4 produces a 9?
[ Parent
| on HN ]
Re:Kilo LISP
by yellowapple on Tuesday March 19, 2019 @07:18PM
(#19437178)
The list is a list of digits, which combine into a single number (that is: '(1 2 3) == #123). 123 × 4 = 492, so (times #123 #4)) unsurprisingly evaluates to #492 (a.k.a. '(4 9 2)).
A bit funky if you're coming from a Lisp that actually does have numbers that evaluate to themselves, but when it hits you it hits you :)