mirror of
https://github.com/kanaka/mal.git
synced 2024-08-17 09:40:21 +03:00
nim: fix string? core function for the empty string
This commit is contained in:
parent
8ae10b10f3
commit
ed9c6187b4
@ -110,7 +110,7 @@ proc false_q*(xs: varargs[MalType]): MalType {.procvar.} =
|
||||
boolObj xs[0].kind == False
|
||||
|
||||
proc string_q*(xs: varargs[MalType]): MalType {.procvar.} =
|
||||
boolObj(xs[0].kind == String and xs[0].str.len > 0 and xs[0].str[0] != '\xff')
|
||||
boolObj(xs[0].kind == String and (xs[0].str.len == 0 or xs[0].str[0] != '\xff'))
|
||||
|
||||
proc symbol*(xs: varargs[MalType]): MalType {.procvar.} =
|
||||
symbol(xs[0].str)
|
||||
|
Loading…
Reference in New Issue
Block a user