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:
parent
b832f794ac
commit
d996fa41b6
@ -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
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user