2 ms·
Nah, there's better solutions; you can create a window/stride method that converts a sequence into a sequence of sequences and then passes that into a map funct
by arcticbull 7y ago
Nah, there's better solutions; you can create a window/stride method that converts a sequence into a sequence of sequences and then passes that into a map function that takes a single argument.
array.stride(2).map(|(x,y) ...|)
Both error checking and ergonomics are preserved.