> I have a base class,Organization, with name and address functions.
> I want classes Buyer and Seller from Organization.
>
> Now if I want to create an 2 instances of Seller
> > data Yahoo = Yahoo
> > instance Organization Yahoo where
> > name _= "Yahoo"
> > addreess = ...
>
> > data DoubleC
Two addenda.
I added
> value::RetVal () a -> a
which extracts the return value from a RetVal in a typesafe manner.
Also, I figured out that exceptions work well with layout so that they
form a column of exception annotations on the right hand side of the
actual code. Does anyone on the l
> f (x then k) = x then (f . k)(*)
> = x then (\y -> f (k y))
>
> where, of course, f is an adequate polymorphic function i.e.
> f : M a -> M a for any type $a$.
You really want here f : M a -> M b.
> It is easy to se
S.M.Kahrs wrote:
>
> > f (x then k) = x then (f . k)(*)
> > = x then (\y -> f (k y))
> >
[...]
> > In the case of the list monad (M a = [a]), equation (*)
> > holds only if $f$ is a morphism over the concat operator
> > i.e. f (u ++ v) = (f u) ++
I want to thank Peter and Ralph for their explanation of how to use Monads
and Either.
I have created a new version of the exception module that is syntactically
cleaner and supports mixing exception types.
It might have been nicer to do this with Existential types (I just read
about them toda