mirror of
https://github.com/janet-lang/janet
synced 2025-09-02 19:08:04 +00:00
Add nan?
This commit is contained in:
@@ -73,6 +73,7 @@
|
|||||||
nil)
|
nil)
|
||||||
|
|
||||||
# Basic predicates
|
# Basic predicates
|
||||||
|
(defn nan? "Check if x is NaN" [x] (not= x x))
|
||||||
(defn even? "Check if x is even." [x] (== 0 (% x 2)))
|
(defn even? "Check if x is even." [x] (== 0 (% x 2)))
|
||||||
(defn odd? "Check if x is odd." [x] (not= 0 (% x 2)))
|
(defn odd? "Check if x is odd." [x] (not= 0 (% x 2)))
|
||||||
(defn zero? "Check if x is zero." [x] (== x 0))
|
(defn zero? "Check if x is zero." [x] (== x 0))
|
||||||
|
Reference in New Issue
Block a user