mirror of https://github.com/rusefi/bldc.git
Squashed 'lispBM/lispBM/' changes from 184f58ca..9290347b
9290347b Change the handling of the closure environment, nolonger a copy of curr_env but a reference to head. GC should ensure that part of the env remains alive as long as the closure. 489544f3 added geq leq to doc git-subtree-dir: lispBM/lispBM git-subtree-split: 9290347b0fdbf16e4ab48ae871c759d8ef108ed1
This commit is contained in:
parent
4d6d76269c
commit
bffb3b1740
|
@ -267,6 +267,35 @@ Example
|
|||
(< 5 2)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### >=
|
||||
|
||||
Greater than or equal comparison. A less than comparison has the form `(>= expr1 ... exprN)`
|
||||
and evaluates to `t` if expr1 is greater than or equal to all of expr2 ... exprN.
|
||||
|
||||
|
||||
Example
|
||||
```clj
|
||||
(>= 5 2)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### <=
|
||||
|
||||
Less than or equal comparison. A less than or equal comparison has the form `(<= expr1 ... exprN)`
|
||||
and evaluates to `t` if expr1 is less than or equal to all of expr2 ... exprN.
|
||||
|
||||
|
||||
Example
|
||||
```clj
|
||||
(<= 5 2)
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
|
||||
(let ((a (lambda (x) (if (= x 0) 1 (a (- x 1))))))
|
||||
(let ((a (lambda (x) (if (= x 0) 2 (a ( - x 1))))))
|
||||
(= (a 1) 2)))
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(let ((f (lambda (x) (if (= x 0) 0 (f (- x 1))))))
|
||||
(= (f 2) 0))
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
(let ((f (lambda (x)
|
||||
(let ((f (lambda (x) (+ x 10))))
|
||||
(f 100)))))
|
||||
(= (f 0) 110))
|
Loading…
Reference in New Issue