mirror of
https://github.com/kanaka/mal.git
synced 2024-09-21 10:37:58 +03:00
14 lines
258 B
OCaml
14 lines
258 B
OCaml
type mal_type =
|
|
| List of mal_type list
|
|
| Int of int
|
|
| Symbol of string
|
|
| Keyword of string
|
|
| Nil
|
|
| Bool of bool
|
|
| String of string
|
|
| Fn of (mal_type list -> mal_type)
|
|
|
|
let to_bool x = match x with
|
|
| Nil | Bool false -> false
|
|
| _ -> true
|