POV-Ray : Newsgroups : povray.off-topic : Why is Haskell interesting? : Re: Why is Haskell interesting? Server Time
4 Sep 2024 21:24:53 EDT (-0400)
  Re: Why is Haskell interesting?  
From: Orchid XP v8
Date: 28 Feb 2010 17:36:41
Message: <4b8aeff9$1@news.povray.org>
Warp wrote:
> Orchid XP v8 <voi### [at] devnull> wrote:
>>    (+5) is a function.
> 
>   But I thought you said you couldn't have symbols as unary functions.

It's a curried function.

If you take any N-argument function and call it with 1 argument, you get 
a new (N-1)-argument function as the result. Since (+) is a 2-argument 
function, giving it one argument (here 5) yields a new 1-argument function.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

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