Created
February 12, 2019 21:20
-
-
Save hlindberg/59ceb023156c817643bc92c7a63899e9 to your computer and use it in GitHub Desktop.
mapping a hash
This file contains 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
$h = { 'b' => ['banana', 'bandana'], 'o' => ['orange', 'ovaltine'] } | |
$h2 = $h.map |$k, $v | { [$k,$v[0]] } | |
notice "h2 = ${h2}" | |
notice Hash($h2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment