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 10:19:35 EDT (-0400)
  Re: I'm in the mood for monads  
From: Shay
Date: 22 Apr 2012 00:33:34
Message: <op.wc5gaxkjmdfjsk@localhost.localdomain>
On Sat, 21 Apr 2012 16:18:46 -0500, Orchid Win7 v1 <voi### [at] devnull> wrote
:

>
> 1. You can take a 5-argument function, pass it 2 argument, and get a  

> 3-argument function as the result.
>
> Examples:
>
> - (+1) takes a number and adds one to it.
>
> - (5 ==) takes a number and returns True if it's 5.
>
> - "map" takes a function and a list. "map abs" takes a list of numbers
  

> and returns a list of positive numbers.

I think I understand monads—I'll likely never try Haskell to fin
d out for  

sure.
I'm pretty sure I understand currying—at least as far as it goes
 in Python.

But I don't understand how any of these are taking a 5 argument function
,  

passing it 2 arguments, and getting a 3 argument function as a result.

  -Shay


Post a reply to this message

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