From d653fc6500f5a09eb509edf7ad0599ab1632ddc1 Mon Sep 17 00:00:00 2001 From: Daniel Cerqueira Date: Mon, 17 Aug 2026 10:20:27 +0100 Subject: remove and > and < , primitives, add and <= and >=, primitives --- examples/mandelbrot.lali | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/mandelbrot.lali') 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))))) -- cgit