From e300b87d5b5488b5aa6ba8f0f94302f4bf4d53e6 Mon Sep 17 00:00:00 2001 From: sher Date: Thu, 26 Oct 2023 23:54:22 +0900 Subject: [PATCH] Add NaN? predicate --- resources/squint/core.edn | 1 + src/squint/core.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/resources/squint/core.edn b/resources/squint/core.edn index 569ec851..e6dc1aa5 100644 --- a/resources/squint/core.edn +++ b/resources/squint/core.edn @@ -87,6 +87,7 @@ max merge min + NaN_QMARK_ neg_QMARK_ next nil_QMARK_ diff --git a/src/squint/core.js b/src/squint/core.js index 5888e227..ec8cd059 100644 --- a/src/squint/core.js +++ b/src/squint/core.js @@ -1396,6 +1396,10 @@ export function* re_seq(re, s) { } } +export function NaN_QMARK_(x) { + return Number.isNaN(x); +} + export function number_QMARK_(x) { return typeof x == 'number'; }