nth_tailr   xtlang


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

Implementation

(bind-func nth_tailr:[List{!a}*,List{!a}*,i64]*
  (lambda (lst idx)
    (let ((nt (lambdas (l i cnt)
                       (if (or (= cnt i) (> cnt i) (null? l))
                           l
                           (nt (cdr l)
                               i
                               (+ cnt 1))))))
      (let ((r (nt lst idx 0)))
        r))))


Back to Index

Similar Entries