Interested in Clojure(script) and functional programming.
- Montreal, Quebec
- matthewfors.com
- @fors_matthew
Pinned Loading
-
-
logger.clj
logger.clj 1;; I use these when I want to throw a lot of `time` functions into code,
2;; as it allows me to append a log to it. Using log-time-str I can
3;; pass the str to whatever logging library I'm using at the time,
4;; to achieve any benefits from that.
5 -
Lazy side effects in clojure - overc...
Lazy side effects in clojure - overcoming chunking 1;; Unlike fully lazy languages such as Haskell, Clojure seqs often implement chunking.
2;; This means that when accessing the first element of a sequence, 32 members will be evaluated.
3;; An example of this can be seen by implementing some side effect in a map.
45(first (map (fn [x] (prn x) x) (range 5))) ;; prints 0 through 4, then returns 0
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.