From c581804c6ffa5824a9b762097a990425007e49cf Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Mon, 17 Jun 2024 18:38:50 +0200 Subject: Add let/set/struct parsing --- examples/arithmetic.bdl | 60 ------------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 examples/arithmetic.bdl (limited to 'examples/arithmetic.bdl') diff --git a/examples/arithmetic.bdl b/examples/arithmetic.bdl deleted file mode 100644 index c313dbb..0000000 --- a/examples/arithmetic.bdl +++ /dev/null @@ -1,60 +0,0 @@ -;; -;; Basic arithmetic operations. -;; - -;; Addition. -(print "(+ 10 100) -> ") -(display (+ 10 100)) -(newline) - -(print "(+ 1 -2 3 4) -> ") -(display (+ 1 -2 3 4)) -(newline) - -;; Substraction. -(print "(- 100 75) -> ") -(display (- 100 75)) -(newline) - -(print "(- 10 20 30) -> ") -(display (- 10 20 30)) -(newline) - -;; Multiplication. -(print "(* 10 7) -> ") -(display (* 10 7)) -(newline) - -(print "(* -1 66) -> ") -(display (* -1 66)) -(newline) - -;; Division. -(print "(/ 45 5) -> ") -(display (/ 45 5)) -(newline) - -(print "(/ 10 5 2) -> ") -(display (/ 10 5 2)) -(newline) - -;; Remainder/modulo. -(print "(% 45 5) -> ") -(display (% 45 5)) -(newline) - -(print "(% 45 7) -> ") -(display (% 45 7)) -(newline) - -(print "(% 120 45) -> ") -(display (% 120 45)) -(newline) - -(print "(% 120 45 8) -> ") -(display (% 120 45 8)) -(newline) - -;; Nesting operations. -(print "(* 20 (+ 100 (- 50 30) (/ 300 3)) 10) -> ") -(display (* 20 (+ 100 (- 50 30) (/ 300 3)) 10)) -- cgit v1.2.1