develooper Front page | perl.perl6.users | Postings from December 2017

Self invoked anonymous functions with no outer scoped ???

Thread Next
From:
Andy Bach
Date:
December 8, 2017 20:25
Subject:
Self invoked anonymous functions with no outer scoped ???
Message ID:
CACV6rWLYnmWmPb5TmiTuX=K4apB-5iAR=nO2LnXP=hYxoJ7Qzg@mail.gmail.com
I ran into this article
https://medium.com/@kasperpeulen/an-interesting-programming-feature-that-no-language-has-except-php-4de22f9e3964

The feature allows [you] to write *self invoked anonymous functions that
don’t let any scope from the outer function leak in*. The syntax he
proposes involves the *use* keyword, followed by explicit parameters, which
is followed by a block that can use those parameters and return a value.

But I don't quite (er, okay, at all) understand what the point is.  Just
curious if P6 has anything along this sort thing.

-- 

a

Andy Bach,
afbach@gmail.com
608 658-1890 cell
608 261-5738 wk

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About