2019-08-28から1日間の記事一覧

(&:odd?)について

> a, = (1..5).partition(&:odd?) => [[1, 3, 5], [2, 4]] > a = (1..5).partition(&:odd?) => [[1, 3, 5], [2, 4]] > a, b = (1..5).partition(&:odd?) => [[1, 3, 5], [2, 4]] > b => [2, 4] > a, = (1..5).partition(&:odd?) ↑なぜaの後ろに「,」が入って…