POV-Ray : Newsgroups : povray.off-topic : Monads in C# : Re: Monads in C# Server Time
28 Jul 2024 20:31:12 EDT (-0400)
  Re: Monads in C#  
From: Anthony D  Baye
Date: 13 Mar 2013 18:25:01
Message: <web.5140fc41719a22bdd97ee2b90@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.