List.materialize and generic map