Merge branch 'master' of github.com:superboum/schemelib

This commit is contained in:
Quentin 2020-07-14 19:28:31 +02:00
commit 6daa1f4d49

View file

@ -10,7 +10,18 @@
((> b e) '())
(#t (cons b (rangeinc (+ 1 b) e)))))
(define (less-than l n) (cond ((null? l) #t) ((<= n 0) #f) (#t (less-than (cdr l) (- n 1)))))
(define (less-than l n)
(cond
((null? l) #t)
((<= n 0) #f)
(#t (less-than (cdr l) (- n 1)))))
(define (beginning l n)
(cond
((null? l) '())
((<= n 0) '())
(#t (cons (car l) (beginning (cdr l) (- n 1))))))
(define (unit v) v)
(define (aget key alist) (cdr (assoc key alist)))
(define (aset key val alist)