[Haskell-cafe] inv f g = f . g . f
Tom Ellis
tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Sat Aug 17 15:37:41 CEST 2013
On Sat, Aug 17, 2013 at 11:11:07AM +0200, Christopher Done wrote:
> Anyone ever needed this? Me and John Wiegley were discussing a decent
> name for it, John suggested inv as in involution. E.g.
>
> inv reverse (take 10)
> inv reverse (dropWhile isDigit)
> trim = inv reverse (dropWhile isSpace) . dropWhile isSpace
This sounds like a job for a lens, or similar.
Tom
More information about the Haskell-Cafe
mailing list