I've got a bit of a functional question.
If I have a functional chain where I compose functions in a way that the output of the previous is the input of the next one.
And somewhere down that chain, I need stuff to do IO, like a client to a DB, etc.
What would be a Clojure way that feels functional to do it?
=========
To explain it more clearly,
(let [map {:aThing "I'm a"}]
(->> (a->b map)
(b->c)
(c->d)
(d->e)))
(a->b)
converts:aThing
into:bThing
(b->c)
converts:bThing
into:cThing
but it needs something that can AES decrypt to do so.(c->d)
converts:cThing
into:dThing
but it does so by fetching things from a database, and thus requires a database username/pasword, endpoint, connection, etc.(d->e)
converts:dThing
into:eThing
and returns it.- The chain is complete.
In Clojure, what would be proper way to allow this chain to work?