POV-Ray : Newsgroups : povray.off-topic : I'm in the mood for monads : Re: I'm in the mood for monads Server Time
29 Jul 2024 16:33:14 EDT (-0400)
  Re: I'm in the mood for monads  
From: Darren New
Date: 22 Apr 2012 23:38:54
Message: <4f94cece$1@news.povray.org>
On 4/21/2012 13:24, Warp wrote:
> I try to suggest "is like this?" the answer is "not really".

That's part of the problem. Occasionally there will be relatively simple 
concepts that aren't "like" anything else. You just have to learn the concept.

It's like I read someone wrote about quantum computers. Someone asked "can 
you give an example of how that quantum computer algorithm would be written 
for a normal computer?"  And the person said "No. That's the point. If you 
could write it for a normal computer, you wouldn't need a quantum computer."

In the case of currying, the simple concept is that a function F that takes 
arguments X, Y, and Z, is the same as a function G that takes argument X and 
returns a function that takes Y and Z, such that for all X, F(X,Y,Z) 
returning G_x(Y,Z) implies G_x(Y,Z) returns the same as F(X,Y,Z). It's a 
simple mathematical statement, not "like" anything in an imperative language 
that doesn't do currying.

-- 
Darren New, San Diego CA, USA (PST)
   "Oh no! We're out of code juice!"
   "Don't panic. There's beans and filters
    in the cabinet."


Post a reply to this message

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