|
|
Orchid Win7 v1 <voi### [at] devnull> wrote:
> OK, so just for giggles, I tried to implement monads in C#.
>
> The short version: It appears that I can create a class with forms a
> monad, however it appears to be impossible to define the concept of
> "being a monad" such that you can write code which polymorphically works
> for any monad.
>
>
<snip>
Not sure I completely understand... The only functional language I've worked
with is LISP, and I only wrote one rather simple program in it, but in the
interest of learning...
Is this something that could be handled with a pure virtual base class which
defines those elements common to ALL monads and requires type-specific
definitions from implementers?
Or perhaps you'd need a mechanism like the STL sort routine which requires you
to pass it a compare function.
Again, I'm not sure I get the concept here...
Regards,
A.D.B.
Post a reply to this message
|
|