this repo has no description
1
2# just some useful nls functions
3
4(define map (lambda (f x) (if x (cons (f (car x)) (map f (cdr x))) nil)))
5(define fold (lambda (f b x) (if x (f (car x) (fold f b (cdr x))) b)))
6(define inc (lambda (x) (+ x 1)))
7(define dec (lambda (x) (- x 1)))
8(define filter (lambda (f x) (if x (if (f (car x)) (cons (car x) (filter f (cdr x))) (filter f (cdr x))) nil)))
9