lib/core/facets/enumerable/graph.rb in facets-2.8.4 vs lib/core/facets/enumerable/graph.rb in facets-2.9.0.pre.1

- old
+ new

@@ -1,8 +1,8 @@ module Enumerable - # Like <tt>#map</tt>/<tt>#collect</tt>, but generates a Hash. The block - # is expected to return two values: the key and the value for the new hash. + # Like `#map`/`#collect`, but generates a Hash. The block is expected + # to return two values: the key and the value for the new hash. # # numbers = (1..3) # squares = numbers.graph{ |n| [n, n*n] } # { 1=>1, 2=>4, 3=>9 } # sq_roots = numbers.graph{ |n| [n*n, n] } # { 1=>1, 4=>2, 9=>3 } #