On Mon, 14 Feb 2005 16:46:17 +0100, Lennart Augustsson <[EMAIL PROTECTED]> wrote: > Remi Turk wrote: > > import Control.Monad.Reader > > > > k :: a -> b -> a > > k = return > > > > s :: (a -> r -> b) -> (a -> r) -> a -> b > > s = flip (>>=) . flip This can be even written as s = ap.
> It can be done without importing anything. > (Except the implicit Prelude import, of course.) It can, but is it possible to do it much easier than > s' = flip flip (span ((0 ==) . fst) . zip [0..] . repeat) . ((.) .) . (id .) > . (uncurry .) . > flip ((.) . flip (.) . (. (snd . head))) . (. (snd . head)) ? Thomas _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe