1
1
mirror of https://github.com/kanaka/mal.git synced 2024-08-17 01:30:26 +03:00

add prn to core

This commit is contained in:
Fabian 2021-03-27 14:26:46 +01:00 committed by Joel Martin
parent b832f794ac
commit d996fa41b6

View File

@ -21,6 +21,12 @@ val coreList = [
| _ => raise NotApplicable "count requires a list")
]
val coreIo = [
SYMBOL "prn",
FN (fn [x] => (TextIO.print ((prStr x) ^ "\n"); NIL)
| _ => raise NotApplicable "'prn' requires one argument")
]
fun intFun n f r [INT a, INT b] = r (f (a, b))
| intFun n _ _ _ = raise NotApplicable ("'" ^ n ^ "' requires two integer arguments")
@ -46,6 +52,7 @@ val coreMath = [
val coreNs = List.concat [
coreList,
coreIo,
coreCmp,
coreMath
]