Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Simulating Perl6 Meta/Hyper operators with pure Functional Programming

by LanX (Canon)
on Oct 01, 2013 at 22:17 UTC ( #1056545=note: print w/ replies, xml ) Need Help??


in reply to Re: Simulating Perl6 Meta/Hyper operators with pure Functional Programming
in thread Simulating Perl6 Meta/Hyper operators with pure Functional Programming

> you'll likely want to write a lift function

An important part of the concept is to return an iterator to the LHS in scalar context for the laziness an array-ref wouldn't help.

And there is no context info which tells me if an X {} is nested or already at the RHS of an assignment.

(OK I could use metamagic like Damian's Contextual::Return which I never really understood, I'm still suspicious that it might be a April's fool joke)

> you have invented monads.

kind of ... already in 2011 ... see YAPC talk

(well even earlier if you count in Frankfurt Perl Workshop)

> the way to solve problems in purely functional languages

OK ... needs disambiguation. I don't really care here about side effects, which is the motivation for monads in Haskell.

But solutions which "only" work with code-references and closures (i.e. w/o blessing or other magic) have many benefits ... like portability.

Cheers Rolf

( addicted to the Perl Programming Language)


Comment on Re^2: Simulating Perl6 Meta/Hyper operators with pure Functional Programming

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1056545]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-12-26 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (168 votes), past polls