The following is a trick to make a function only exhibit its side effects once.
(def warn-once
(memoize
(fn []
(prn "Hello Warning"))))
(warn-once)
;; "Hello Warning"
(warn-once)
The following is a trick to make a function only exhibit its side effects once.
(def warn-once
(memoize
(fn []
(prn "Hello Warning"))))
(warn-once)
;; "Hello Warning"
(warn-once)