[ MIRROR ] An interpreter for a Lisp-like language git.ngill.net/nls.git
Something went wrong. Try again.
12345678910# just some useful nls functions(define map (lambda (f x) (if x (cons (f (car x)) (map f (cdr x))) nil)))(define fold (lambda (f b x) (if x (f (car x) (fold f b (cdr x))) b)))(define inc (lambda (x) (+ x 1)))(define dec (lambda (x) (- x 1)))(define filter (lambda (f x) (if x (if (f (car x)) (cons (car x) (filter f (cdr x))) (filter f (cdr x))) nil)))