|
|
|
|
|
by throwaway487548
2784 days ago
|
|
There are actually more than one reason. I know at least two. 1. The classic Scheme based courses used to bootstrap an OO-DSL embedded in Scheme based on procedures and message-passing (you literally send a symbol by calling the object, which is a lambda, of course with an argument and get back a closure to run - a method). This is an invaluable experience to realize that there is absolutely nothing special about OOP and there is no magic. 2. There are still some gems (which leads to very real a-ha moments!) which cannot be taught in other languages. Here is one: (define partially (lambda (f . as)
(lambda xs
(apply f (append as xs)))))
and then (define reverse (partially foldl (flip cons) '()))
|
|