1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-21 10:37:58 +03:00
mal/ocaml/types.ml
2015-01-30 12:54:42 -05:00

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