I've implemented pure versions of map_rows, map_rows2, and make_incrementer - here's an updated Playground link.
The signatures are almost the same - I've just replaced &mut Grid with &[Vec<i32>]. The only difference is the body of the functions themselves but you're correct - this set adheres more strictly to a functional paradigm whereas the originals do not.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I've implemented pure versions of
map_rows
,map_rows2
, andmake_incrementer
- here's an updated Playground link.The signatures are almost the same - I've just replaced
&mut Grid
with&[Vec<i32>]
. The only difference is the body of the functions themselves but you're correct - this set adheres more strictly to a functional paradigm whereas the originals do not.