[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Syntactic sugar for function parameters
- From: Robert Raschke <rrlua@...>
- Date: Thu, 8 Feb 2007 10:47:52 +0000
>> If copying is an option, I really want to see lua copy
>> something from Haskell, like currying and drop the ()
>> for function calls.
>
> dropping () for function calls cannot work:
>
> myprint = print
>
I think it was meant as in "if there's no parens after the function
take the next thing as the sole argument", like:
a_string = "foobar"
print a_string
or
twice = function (x) return function(y) return x(x(y)) end end
double = function (x) return x + x end
print (twice double 42)
Robby
--
r dot raschke at tombob dot com