The "Double bananas"
- inside a threading macro to "protect" a fn; action: stop the threading or refactor it with
((comp f g) x)or
((juxt f g) x)or
((partial f x) y)(the three most frequent); action: unroll the
- in other cases it's worth considering giving the poor thing a name
In general I find
((f x) y z) hard to follow, harder than
(g (f x) z) for example. In the second case the role of
(f x) is given by
(f x) must be a predicate). In the first case the role of
(f x) is given by f alone. To recap: with
(g (f x) z) you have two sources of information to infer the nature of
(f x) (and may realize there's a glitch when the two sources are discordant), with
((f x) y z) you only have one source of information.