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?