1
1
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:
Nicolas Boulenguez 2021-08-17 20:19:26 +02:00 committed by Joel Martin
parent 8ae10b10f3
commit ed9c6187b4

View File

@ -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)