DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
6+2 =
Submit