Re:Kilo LISP
by cryptonector on Tuesday March 19, 2019 @12:36PM
(#19432465)
Multiply.
[ Parent
| on HN ]
ok, but why 2 * 4 produces a 9?
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 :)