mirror of
https://github.com/kanaka/mal.git
synced 2024-08-17 01:30:26 +03:00
skew: allow keyword argument for keyword core function
This commit is contained in:
parent
1580db1a53
commit
8807a988ae
@ -14,7 +14,7 @@ const ns StringMap<fn(List<MalVal>) MalVal> = {
|
|||||||
"string?": (a List<MalVal>) => MalVal.fromBool(a[0] is MalString),
|
"string?": (a List<MalVal>) => MalVal.fromBool(a[0] is MalString),
|
||||||
"symbol": (a List<MalVal>) => MalSymbol.new((a[0] as MalString).val),
|
"symbol": (a List<MalVal>) => MalSymbol.new((a[0] as MalString).val),
|
||||||
"symbol?": (a List<MalVal>) => MalVal.fromBool(a[0] is MalSymbol),
|
"symbol?": (a List<MalVal>) => MalVal.fromBool(a[0] is MalSymbol),
|
||||||
"keyword": (a List<MalVal>) => MalKeyword.new((a[0] as MalString).val),
|
"keyword": (a List<MalVal>) => a[0] is MalKeyword ? a[0] : MalKeyword.new((a[0] as MalString).val),
|
||||||
"keyword?": (a List<MalVal>) => MalVal.fromBool(a[0] is MalKeyword),
|
"keyword?": (a List<MalVal>) => MalVal.fromBool(a[0] is MalKeyword),
|
||||||
"number?": (a List<MalVal>) => MalVal.fromBool(a[0] is MalNumber),
|
"number?": (a List<MalVal>) => MalVal.fromBool(a[0] is MalNumber),
|
||||||
"fn?": (a List<MalVal>) => MalVal.fromBool(a[0] is MalNativeFunc ||
|
"fn?": (a List<MalVal>) => MalVal.fromBool(a[0] is MalNativeFunc ||
|
||||||
|
Loading…
Reference in New Issue
Block a user