
14 Feb
2005
14 Feb
'05
11:08 a.m.
On Mon, 14 Feb 2005 16:46:17 +0100, Lennart Augustsson
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