Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created June 15, 2017 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dogbert17/a0a3057f59b4263753968c4367afcde2 to your computer and use it in GitHub Desktop.
Save dogbert17/a0a3057f59b4263753968c4367afcde2 to your computer and use it in GitHub Desktop.
Attempt to improve the 'is nodal' docs
=head4 trait C<is nodal>
Mark a C<method> so hyperoperators do not descend into it.
In order to demonstrate the difference consider the following examples, the first
using a method (C<elems>) that C<is nodal> and the second using a method (C<Int>)
which is not.
say ((1.0, "2", 3e0), [^4], '5')».elems; # OUTPUT: «(3, 4, 1)␤»
say ((1.0, "2", 3e0), [^4], '5')».Int # OUTPUT: «((1 2 3) [0 1 2 3] 5)␤»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment