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 14:26:31 EDT (-0400)
  Re: I'm in the mood for monads  
From: Orchid Win7 v1
Date: 22 Apr 2012 14:36:23
Message: <4f944fa7$1@news.povray.org>
On 22/04/2012 05:34 PM, clipka wrote:

> Maybe that's what scrambles my mind whenever I read "Haskellists'"
> explanations of stuff: They're so proud that Haskell does it
> automatically for you, that they tend to deny the obvious parallels.
>
> So yes: Currying *is* like writing a function that takes fewer
> arguments, calling the original one and supplying (unchangeable)
> defaults for the missing arguments.
>
> And yes, apparently Haskell provides syntactic sugar for that. Wow. Big
> deal.
>
>> Finally, like I said, currying works backwards too: If a function call
>> happens to return a function as its result, you can just keep appending
>> arguments. "head function_list 7" and all that.
>
> Again, nice-to-have syntactic sugar, but nothing conceptually
> fascinating (as you noted yourself).

You seem to be missing the third point: Function currying allows you to 
write code that polymorphically accepts functions with ANY number of 
arguments.

That can be a Big Deal.

That said, yeah, of all the things that Haskell does, function currying 
is one of the less exciting ones.


Post a reply to this message

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