Use a hand written loop for algorithm::map so it also works with movable types