lockstep works with .each, but fails with .map

Jacob Carlborg doob at me.com
Fri Mar 5 19:26:38 UTC 2021


On 2021-03-05 19:49, realhet wrote:

> Why it works with each (or foreach), but not with map? o.O

`lockstep` is specifically designed to work with `foreach`. I think 
`each` has a special case to work with `lockstep`. If you want to use 
other range functions, you should use `zip` instead of `lockstep`.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list