3 ms·
> The language has enough information No. > expected function that takes 1 argument `map` expects a function that takes one, two, or three arguments.
by nwellnhof 7y ago
> The language has enough information
No.
> expected function that takes 1 argument
`map` expects a function that takes one, two, or three arguments.
- arcticbull 7y agoWell there's your first problem haha.
- fortran77 7y agoRight! It should have a map, map2, map3 function
- arcticbull 7y agoNah, 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.
- a1369209993 7y agoWell, more like map, mapIndex, mapIndexSrc[0], but yes. 0: Going by JS naming conventions anyway; I'd use somthing like map, mapi, no-that's-useless personally.