append   xtlang


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

Implementation

;; keep it tail recursive!
(bind-func append:[List{!a}*,List{!a}*,List{!a}*]*
  (let ((f (lambda (a b)
             (if (null? a) b
                 (f (cdr a) (cons (car a) b))))))
    (lambda (as bs)
      (f (reverse as) bs))))


Back to Index

Similar Entries