top | item 45612251

(no title)

_jackdk_ | 4 months ago

> I have queries that depend on responses of preceding queries , how will my runAp_ give me this? It probably won’t.

It definitely won't, which is what I was trying to get at with the discussion of monads and data dependencies. Applicatives by definition cannot have one "effectful" computation depend on the result of another. You could do a large bunch of parallel work until you need to pass a result into a function that decides what additional work to perform, at which point you need a monad. More advanced frameworks like Haxl apparently make this distinction explicit, so your computation proceeds as a sequence of batched parallel options, combining as much work as possible.

discuss

order

vjerancrnjak|4 months ago

I guess we just need pipelining systems that batch.

These patterns constantly appear yet we continue writing code step by step.