mirror of
https://github.com/kanaka/mal.git
synced 2024-08-17 09:40:21 +03:00
nim: allow keyword argument for keyword core function
This commit is contained in:
parent
5047a2cee3
commit
8ae10b10f3
@ -119,7 +119,8 @@ proc symbol_q*(xs: varargs[MalType]): MalType {.procvar.} =
|
||||
boolObj xs[0].kind == Symbol
|
||||
|
||||
proc keyword*(xs: varargs[MalType]): MalType {.procvar.} =
|
||||
keyword(xs[0].str)
|
||||
if 0 < xs[0].str.len and xs[0].str[0] == '\xff': xs[0]
|
||||
else: keyword(xs[0].str)
|
||||
|
||||
proc keyword_q*(xs: varargs[MalType]): MalType {.procvar.} =
|
||||
boolObj(xs[0].kind == String and xs[0].str.len > 0 and xs[0].str[0] == '\xff')
|
||||
|
Loading…
Reference in New Issue
Block a user