I agree that is one way to do it. I often don’t go for this more inline style because the sites where work is done are more spread out. A lot of times I like seeing exactly what is going on in one place and then the results. The example given was a trivial example. If that turned into a map with 8 parameters I think my point would be a bit stronger.
For instance here’s an example from our codebase that is creating a handler for a react component. There’s lot of data accumulation and preparation and then the handler is created. These values are used in multiple places and further, it would be difficult to look through all of the maps to see exactly what “work” is being done.
(assoc value
:send! #(common-actions-send handler {:graph graph
:phi phi
:uri-svc uri-svc
:ribbon ribbon
:value value
:user-info user-info} %)
:user-info user-info)