POV-Ray : Newsgroups : povray.off-topic : Wikipath : Re: Wikipath Server Time
1 Oct 2024 00:04:58 EDT (-0400)
  Re: Wikipath  
From: Nicolas Alvarez
Date: 14 Aug 2008 19:04:56
Message: <48a4ba18@news.povray.org>
Invisible wrote:
> is a lambda function. It does roughly the same thing is
> 
>    function NONAME(x)
>    {
>      return 3*x + 5;
>    }
> 
> in JavaScript. The difference - obviously - is that lambda functions
> don't have names.

JavaScript functions don't need names.

var value = (function (x) {
    return 3*x + 5;
})(42);

That actually works.


Post a reply to this message

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