Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: How to understand chapter 6 of Higher Order Perl? (promise/show)

by Anonymous Monk
on Mar 13, 2014 at 08:57 UTC ( [id://1078139]=note: print w/replies, xml ) Need Help??


in reply to How to understand chapter 6 of Higher Order Perl?

https://metacpan.org/pod/HOP::Stream#promise says

promise

my $promise = promise { ... };
A utility function with a code prototype (sub promise(&);) allowing one to specify a coderef with curly braces and omit the sub keyword.

For debugging you might try https://metacpan.org/pod/HOP::Stream#show

  • Comment on Re: How to understand chapter 6 of Higher Order Perl? (promise/show)
  • Download Code

Replies are listed 'Best First'.
Re^2: How to understand chapter 6 of Higher Order Perl? (promise/show)
by Anonymous Monk on Mar 13, 2014 at 15:55 UTC

    For comparison; sub allows you to specify a coderef with curly braces. And sub allows you to omit the "promise" word.

    What's the point of "promise" other than to make you type more letters?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-23 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found