Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Improve example for bare method disambiguity.
  • Loading branch information
skids committed Apr 15, 2015
1 parent a24d845 commit e6e4d7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Language/objects.pod
Expand Up @@ -52,7 +52,9 @@ Since you have to put a C<:> after the method if you want to pass arguments
without parentheses, a method call without a colon or parens is
unambiguously a method call without an argument list:
$computation-result.say;
say 4.log: ; # 1.38629436111989 ( natural logarithm of 4 )
say 4.log: +2; # 2 ( base-2 logarithm of 4 )
say 4.log +2; # 3.38629436111989 ( natural logarithm of 4, plus 2 )
Many operations that don't look like method calls (for example, smart
matching, or interpolating an object into a string) result in method calls
Expand Down

0 comments on commit e6e4d7e

Please sign in to comment.