Skip to content

Commit

Permalink
[MMD] use method form of map consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Oct 18, 2009
1 parent c100c05 commit dc98ead
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/multi-dispatch.pod
Expand Up @@ -25,12 +25,12 @@ L<http://github.com/moritz/json/>.
}
multi to-json(Array $d) {
return '[ '
~ (map { to-json($_) }, $d.values).join(', ')
~ $d.values.map({ to-json($_) }).join(', ')
~ ' ]';
}
multi to-json(Hash $d) {
return '{ '
~ (map { to-json(.key) ~ ' : ' ~ to-json(.value) }, $d.pairs).join(', ')
~ $d.pairs.map({ to-json(.key) ~ ' : ' ~ to-json(.value) }).join(', ')
~ ' }';
}

Expand Down

0 comments on commit dc98ead

Please sign in to comment.