Looks nice to me. For consistency, how about "(||c)" instead of
"[||c]", of type (a|b|c). Also, I think you mean
mapSum f g [|b] = [| g b ]
- Conal
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Nathan Linger
Sent: Friday, February 2
Amit Garg wrote:
>
> Hey all.
>
> I am trying to declare a read-only state monad and a read-write state
> monad, so as to distinguish between methods on a data type that are
> read-only vs. read-write.
>
> This is the best I could come up with:
>
> newtype ST s a = ST ( s -> (s,a) ) -- read-onl