deft/notes/2020-05-26--06-21-28Z--idiomatic_clojure_mixing_side_effects_and_iteration.org
Yann Esposito (Yogsototh) d641cd04d9
moved files
2021-09-15 09:12:29 +02:00

15 lines
471 B
Org Mode

:PROPERTIES:
:ID: 0ffa6c7e-87c3-4cbc-8896-7208462f9268
:END:
#+TITLE: Idiomatic Clojure: Mixing Side Effects and Iteration
#+Author: Yann Esposito
tags :: [[id:debfbdb6-03a6-478e-8316-bce0119c0dd7][clojure]]
source :: [[https://bsless.github.io/side-effects/][Idiomatic Clojure: Mixing Side Effects and Iteration]]
Main lessons:
- Never use ~doall~
- use ~mapv~ or ~(into [] (map f) coll)~ if you want to retrieve the elements
- use ~(run! f coll)~ or ~doseq~