
That signature is the `oo` "specs" combinator in Data.Aviary:
fun = runFun `oo` someFun someDefault
-md begin Sean Leather quotation:
I find myself often writing this pattern:
someFun x y z = ...
fun y z = runFun $ someFun someDefault y z
or, alternatively:
fun y = runFun . someFun someDefault y
The second option approaches the ideal pointfreeness (or pointlessness if you prefer), but I'd like to go farther:
(...) :: (c -> d) -> (a -> b -> c) -> a -> b -> d
(...) f g x y = f (g x y) infixr 9 ...
fun = runFun ... someFun someDefault
There, that's better. More points for fewer points (which means I should really change the name from fun to pun).
Does anybody else care about this? What are some alternative solutions? I'd love to have something like this available in the Prelude or a library. (I have no strong feelings about the particular operator.)
Regards, Sean
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe