* module/mes/scm.mes (abs): New function.
This commit is contained in:
Jan Nieuwenhuizen 2016-12-20 21:22:21 +01:00
parent 23754e6f75
commit 8b172e3438

View file

@ -185,6 +185,9 @@
(define (1- x)
(- x 1))
(define (abs x)
(if (>= x 0) x (- x)))
(define (expt x y)
(let loop ((s 1) (count y))
(if (= 0 count) s