Skip to content

Commit

Permalink
Avoid .WHAT where possible, use name instead
Browse files Browse the repository at this point in the history
... But, because WhateverCode's ^name is funky, show .WHAT after
showing the funky name result.
  • Loading branch information
coke committed May 10, 2019
1 parent 2b770d5 commit c9b99f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/Type/Range.pod6
Expand Up @@ -52,11 +52,12 @@ Beware that a L<WhateverCode|/type/WhateverCode> end point, instead of a plain
Whatever, will go through the range operator and create another WhateverCode
which returns a Range:
=for code
=for code :ok-test<WHAT>
# A Whatever produces the 1..Inf range
say (1..*).WHAT; # OUTPUT: «(Range)␤»
say (1..*).^name; # OUTPUT: «Range␤»
say (1..*); # OUTPUT: «1..Inf␤»
# Upper end point is now a WhateverCode
say (1..*+20).^name; # OUTPUT: «{ ... }␤»
say (1..*+20).WHAT; # OUTPUT: «(WhateverCode)␤»
say (1..*+20).(22); # OUTPUT: «1..42␤»
Expand Down

0 comments on commit c9b99f3

Please sign in to comment.