Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby group by

(1..6).group_by { |i| i%3 }   #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]}
Source by apidock.com #
 
PREVIOUS NEXT
Tagged: #ruby #group
ADD COMMENT
Topic
Name
6+2 =