The likes of pureIf and memptyWhen should probably take lazy values. Whilst they're usually used in lambdas with some laziness, they'd ideally delay computing the lifted value until the condition passes. It mightn't make sense for applicative when where it's for effectful computation.
The likes of
pureIf
andmemptyWhen
should probably take lazy values. Whilst they're usually used in lambdas with some laziness, they'd ideally delay computing the lifted value until the condition passes. It mightn't make sense for applicativewhen
where it's for effectful computation.