Re: => Lambda shorthand syntax
Ralph Ritoch <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user,gmane.comp.lang.pike.devel |
|---|---|
| Message-ID | <CABFWrWVwemmMYkXe4b0Gig-cB3gw5wyW+DRmE0y_95N4tzfDTg@mail.gmail.com> |
I don't see it in the documentation but pike already has a syntax for
lambda expressions.
Example:
int main() {
function y = lambda(int x) { return x * x; };
write((string)y(5));
}
Good luck with the pursuit for more operators.
Best Regards,
Ralph Ritoch
On Sat, Mar 14, 2015 at 5:45 PM, Stephen R. van den Berg <[email protected]>
wrote:
> Has anyone ever considered adding support for the => shorthand lambda
> operator to Pike?
>
> It's available in several languages. The docs for C# are here:
> https://msdn.microsoft.com/en-us/library/bb397687(v=vs.110).aspx
> --
> Stephen.
>
>