summaryrefslogtreecommitdiff
path: root/examples/mandelbrot.lali
diff options
context:
space:
mode:
authorDaniel Cerqueira <dan.git@lispclub.com>2026-08-17 10:20:27 +0100
committerDaniel Cerqueira <dan.git@lispclub.com>2026-08-17 10:26:21 +0100
commitd653fc6500f5a09eb509edf7ad0599ab1632ddc1 (patch)
tree2a9d87d655f43e6d51b9dbef68015bea287b1bdb /examples/mandelbrot.lali
parentd804473bbf326409856544200818279a9acda805 (diff)
remove and > and < , primitives, add and <= and >=, primitivesv.0.2.0
Diffstat (limited to 'examples/mandelbrot.lali')
-rw-r--r--examples/mandelbrot.lali4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/mandelbrot.lali b/examples/mandelbrot.lali
index 0268deb..ad3b74f 100644
--- a/examples/mandelbrot.lali
+++ b/examples/mandelbrot.lali
@@ -1,5 +1,5 @@
(defun for (from to func)
- (cond ((< from to) (func from) (for (+ from +1) to func))))
+ (cond ((not (>= from to)) (func from) (for (+ from +1) to func))))
(set 'mandelbrot-chars
(list " " "." "," "`" "'" "\"" ":" ";" "-" "+" "o" "O" "0" "1"
@@ -7,7 +7,7 @@
(defun mandelbrot-iter (x y x0 y0 i)
(fill ((diff i +28) " ")
- ((not (> (+ (* x0 x0) (* y0 y0)) +4)) (nth i mandelbrot-chars))
+ ((<= (+ (* x0 x0) (* y0 y0)) +4) (nth i mandelbrot-chars))
(f (mandelbrot-iter x y
(+ (- (* x0 x0) (* y0 y0)) x) (+ (* +2 x0 y0) y)
(+ i +1)))))