14 lines
396 B
Plaintext
14 lines
396 B
Plaintext
(defenum Key [space 32 left 263])
|
|
(defstruct Enemy [hp i32 name str key Key])
|
|
|
|
(defn look-up [k Key] (Option i32)
|
|
(if (= k :space) (Some 32) None))
|
|
|
|
(defn main [] ()
|
|
(println 42) ; an i32, uncast
|
|
(println 1.5)
|
|
(println (Enemy {.hp 3 .name "wisp" .key :left}))
|
|
(println (look-up :space))
|
|
(println (look-up :left))
|
|
(print "no newline: ") (println true))
|