|
|
|
|
|
by elif
537 days ago
|
|
nested_example = [1, 2, 3, 4, 5].map do [it, (1..it).map { it * it }]
endHas an ambiguity, so you just add |x| to one of them.. nested_example = [1, 2, 3, 4, 5].map do |x| [x, (1..x).map { x * it }]
endSeems like a mental over complication of a non-issue to me. |
|