We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec3421c commit 4551b92Copy full SHA for 4551b92
core/src/ys/std.clj
@@ -723,6 +723,18 @@
723
724
(defmacro &&& [x & xs] `(and? ~x ~@xs))
725
726
+(defn if? [cond then else]
727
+ (if (truey? cond) then else))
728
+
729
+(defn if-not? [cond then else]
730
+ (if-not (truey? cond) then else))
731
732
+(defn when? [cond & body]
733
+ (when (truey? cond) (doall body)))
734
735
+(defn when-not? [cond & body]
736
+ (when (falsey? cond) (doall body)))
737
738
739
;;------------------------------------------------------------------------------
740
;; File system functions
0 commit comments