From 8807a988aeeff6fecf27aabff9afb323be6d6aec Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Wed, 8 Sep 2021 02:18:50 +0200 Subject: [PATCH] skew: allow keyword argument for keyword core function --- impls/skew/core.sk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impls/skew/core.sk b/impls/skew/core.sk index a337ab72..b65d08c4 100644 --- a/impls/skew/core.sk +++ b/impls/skew/core.sk @@ -14,7 +14,7 @@ const ns StringMap) MalVal> = { "string?": (a List) => MalVal.fromBool(a[0] is MalString), "symbol": (a List) => MalSymbol.new((a[0] as MalString).val), "symbol?": (a List) => MalVal.fromBool(a[0] is MalSymbol), - "keyword": (a List) => MalKeyword.new((a[0] as MalString).val), + "keyword": (a List) => a[0] is MalKeyword ? a[0] : MalKeyword.new((a[0] as MalString).val), "keyword?": (a List) => MalVal.fromBool(a[0] is MalKeyword), "number?": (a List) => MalVal.fromBool(a[0] is MalNumber), "fn?": (a List) => MalVal.fromBool(a[0] is MalNativeFunc ||