On 17 February 2010 15:41, Mike Dillon <mike@embody.org> wrote:
> That signature is the `oo` "specs" combinator in Data.Aviary:
I wouldn't recommend writing code that depends on Data.Aviary, butsome of the combinators are often worth copy/pasting out of it.
import Control.Category
import Prelude hiding ((.))
-- oo :: (c -> d) -> (a -> b -> c) -> a -> b -> d
oo :: (Category cat) => cat c d -> (a -> cat b c) -> a -> cat b d
oo = (.) . (.)
-- ooo :: (d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e
ooo :: (Category cat) => cat d e -> (a -> b -> cat c d) -> a -> b -> cat c e
ooo = (.) . (.) . (.)
-- oooo :: (e -> f) -> (a -> b -> c -> d -> e) -> a -> b -> c -> d -> f
oooo :: (Category cat) => cat e f -> (a -> b -> c -> cat d e) -> a -> b -> c -> cat d f
oooo = (.) . (.) . (.) . (.)