Created
October 28, 2014 17:32
-
-
Save ab5tract/5b65a86e7a1926079187 to your computer and use it in GitHub Desktop.
experiments in lookup inlining - perl 6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > (@words Z 1 xx @words.elems).hash | |
| "does" => 1, "go" => 1, "how" => 1, "it" => 1 | |
| > $message.split(' ') | |
| it go | |
| > (@words Z 1 xx @words.elems).hash | |
| "does" => 1, "go" => 1, "how" => 1, "it" => 1 | |
| > (@words Z 1 xx @words.elems).hash<$_> for @words | |
| > (@words Z 1 xx @words.elems).hash<$_> for $message.split(' ') | |
| > say (@words Z 1 xx @words.elems).hash<$_> for $message.split(' ') | |
| (Any) | |
| (Any) | |
| > (@words Z 1 xx @words.elems).hash | |
| "does" => 1, "go" => 1, "how" => 1, "it" => 1 | |
| > (@words Z 1 xx @words.elems).hash<does> | |
| 1 | |
| > say $_ for $message.split(' ') | |
| it | |
| go | |
| > my %hash = (@words Z 1 xx @words.elems).hash | |
| "does" => 1, "go" => 1, "how" => 1, "it" => 1 | |
| > say "{$_} in {%hash<$_>} yup it is" for $message.split(' ') | |
| use of uninitialized value %hash of type Any in string context in block <unit> at <unknown file>:1 | |
| in yup it is | |
| use of uninitialized value %hash of type Any in string context in block <unit> at <unknown file>:1 | |
| in yup it is | |
| > %hash | |
| "does" => 1, "go" => 1, "how" => 1, "it" => 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment