scheme
まあこういう違いです。引数の適用の仕方なので、方言みたいなものですが。 CommonLisp - reduce (defun myreverse (lis) (reduce (lambda (x y) (cons y x)) lis :initial-value nil)) (myreverse '(1 2 3 4 5)) ; (5 4 3 2 1) Scheme - fold (define (myre…
sexp なんかいやらしい。 Common LispだったらPredicateってことでしょ?sexp、Schemeだったらsex? あああああ
Schemeのfold = 関数func(listelem, init)で適用させる。おやすみ。