foldl   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/adt.xtm

Implementation

(bind-func foldl:[!b,[!b,!b,!a]*,!b,List{!a}*]*
  (lambda (fn start lst)
    (let ((fold (lambda (l r) ; list result
                  (if (null? l)
                      r
                      (fold (cdr l) (fn r (car l)))))))
      (fold lst start))))


Back to Index

Similar Entries