3 ms·
> way to return a list of four arguments from a method p, q, r, s = * method_that_returns_array_of_4_things * aka "splat operator"
by zwp 15y ago
> way to return a list of four arguments from a method
p, q, r, s = * method_that_returns_array_of_4_things
* aka "splat operator"
- kragen 15y agoThat's great, thanks! And that works for method calls too. So now I can replace set_color_from @cells[x][y] with fill *color_from(@cells[x][y]), reducing the number of side-effecting methods by one, and now I'm calling every Processing function in at most one place.