2 ms·
Wow that's almost the same as scheme. Here's the scheme version of the above code: Your example would be translated as: (lambda (a b) (+ a b)) ;; making an an
by kanak 16y ago
Wow that's almost the same as scheme. Here's the scheme version of the above code:
Your example would be translated as:
(lambda (a b) (+ a b)) ;; making an anonymous function
(define add (lambda (a b) (+ a b))); ;; calling the anonymous function "add"
(define (add a b) (+ a b)) ;; syntactic sugar for above.