diff options
Diffstat (limited to 'examples/mandelbrot.lali')
| -rw-r--r-- | examples/mandelbrot.lali | 4 |
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))))) |
