You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
; ------------------------------------------------------------------------------
|
|
|
|
; literals
|
|
|
|
; ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
; integer
|
|
|
|
1
|
|
|
|
|
|
|
|
; float
|
|
|
|
3.14
|
|
|
|
|
|
|
|
; string
|
|
|
|
"jordan"
|
|
|
|
|
|
|
|
; booleans. I don't like the look of #t and #f. They're dumb.
|
|
|
|
true
|
|
|
|
false
|
|
|
|
|
|
|
|
; ------------------------------------------------------------------------------
|
|
|
|
; basic math
|
|
|
|
; ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(+ 1 1)
|
|
|
|
(- 1 1)
|
|
|
|
(* 1 1)
|
|
|
|
(/ 1 1)
|
|
|
|
|
|
|
|
; ------------------------------------------------------------------------------
|
|
|
|
; grammar
|
|
|
|
; ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
(define x 5)
|
|
|
|
x
|
|
|
|
|
|
|
|
(quote 1 2 3)
|
|
|
|
|
|
|
|
(if 1 2 3)
|
|
|
|
(if false 2 3)
|
|
|
|
(if true 2 3)
|