Add a more general satisfyMaybe helper
authorMoritz Kiefer <moritz.kiefer@purelyfunctional.org>
Sat, 10 Aug 2019 08:08:02 +0000 (10:08 +0200)
committerMoritz Kiefer <moritz.kiefer@purelyfunctional.org>
Sat, 10 Aug 2019 08:08:02 +0000 (10:08 +0200)
`satisfy` is a bit akward to use for the same reasons that `filter`
can sometimes be a bit awkward to use: You often have to repeat the
same check on the result you get from `satisfy`.

This PR adds a `satisfyMaybe` wrapper that acts a bit like `mapMaybe`
and avoids that issue. This also allows us to remove `castMsg`.


No differences found