- F = fun (N) -> N + 1 end,
- [2, 3, 4] = hope_list:map_slow([1, 2, 3], F),
- [] = hope_list:map_slow([], F).
+ ?PROPTEST(map_slow).
+
+map_slow() ->
+ ?FORALL({L, F}, {list(integer()), function([integer()], term())},
+ hope_list:map_slow(L, F) == lists:map(F, L)).
+
+t_map(_Cfg) ->
+ ?PROPTEST(map).
+
+map() ->
+ ?FORALL({L, F}, {list(integer()), function([integer()], term())},
+ hope_list:map(L, F) == lists:map(F, L)).
+
+t_map_3(_Cfg) ->
+ ?PROPTEST(map_3).
+
+map_3() ->
+ ?FORALL({L, F, N}, {list(integer()), function([integer()], term()), non_neg_integer()},
+ hope_list:map(L, F, N) == lists:map(F, L)).