aboutsummaryrefslogtreecommitdiffstats
path: root/examples/arithmetic.bdl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/arithmetic.bdl')
-rw-r--r--examples/arithmetic.bdl22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/arithmetic.bdl b/examples/arithmetic.bdl
new file mode 100644
index 0000000..5e102e9
--- /dev/null
+++ b/examples/arithmetic.bdl
@@ -0,0 +1,22 @@
1;
2; Basic arithmetic operations
3;
4
5; Addition
6(+ 10 100)
7(+ 1 -2 3 4)
8
9; Substraction
10(- 100 75)
11(- 10 20 30)
12
13; Multiplication
14(* 10 7)
15(* -1 66)
16
17; Division
18(/ 45 5)
19(/ 10 5 2)
20
21; Nesting operations.
22(* 20 (+ 100 (- 50 30) (/ 300 3)) 10)