[Haskell] Do the libraries define S' ?
Graham Klyne
gk at ninebynine.org
Fri Jul 9 05:12:16 EDT 2004
At 14:45 07/07/04 -0400, Andrew Pimlott wrote:
>This can be seen as liftM2 on the reader monad ((->) r):
>
>(.&.) = liftM2 (&&)
Thanks to those who pointed out this.
I think the ((->) r) reader monad is one of those I've yet to fully grasp.
#g
--
At 14:45 07/07/04 -0400, Andrew Pimlott wrote:
> > -- combineTest :: (Bool->Bool->Bool) -> (a->Bool) -> (a->Bool) -> (a->Bool)
> > combineTest :: (b->c->d) -> (a->b) -> (a->c) -> a -> d
> > combineTest c t1 t2 = \a -> c (t1 a) (t2 a)
> >
> > (.&.) :: (a->Bool) -> (a->Bool) -> (a->Bool)
> > (.&.) = combineTest (&&)
>
>This can be seen as liftM2 on the reader monad ((->) r):
>
>(.&.) = liftM2 (&&)
>t1 = (>0) .&. (<=4)
>ans = t1 3 == True
------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact
More information about the Haskell
mailing list