Slide 42
Slide 42 text
Ruby Kotlin
a.map {i -> i * 10}
a.reduce {sum,n -> sum + n}
a.groupBy {i -> i % 2}
a.filter {i -> i % 2 == 0}
a.map {|i| i * 10}
a.reduce {|sum,n| sum + n}
a.group_by {|i| i % 2}
a.select {|i| i % 2 == 0}
(参考)Rubyエンジニアに親しみやすい構文