mirror of
https://github.com/kanaka/mal.git
synced 2024-09-11 13:55:55 +03:00
add prn to core
This commit is contained in:
parent
b832f794ac
commit
d996fa41b6
@ -21,6 +21,12 @@ val coreList = [
|
|||||||
| _ => raise NotApplicable "count requires a list")
|
| _ => 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))
|
fun intFun n f r [INT a, INT b] = r (f (a, b))
|
||||||
| intFun n _ _ _ = raise NotApplicable ("'" ^ n ^ "' requires two integer arguments")
|
| intFun n _ _ _ = raise NotApplicable ("'" ^ n ^ "' requires two integer arguments")
|
||||||
|
|
||||||
@ -46,6 +52,7 @@ val coreMath = [
|
|||||||
|
|
||||||
val coreNs = List.concat [
|
val coreNs = List.concat [
|
||||||
coreList,
|
coreList,
|
||||||
|
coreIo,
|
||||||
coreCmp,
|
coreCmp,
|
||||||
coreMath
|
coreMath
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user