1-module(lists2).
2-vsn(2).
3
4-export([assoc/2, multi_map/2]).
5
6assoc(Key, [{Key, Val} | _]) -> {ok, Val};
7assoc(Key, [H | T]) -> assoc(Key, T);
8assoc(Key, []) -> false.
9
10multi_map(Func, [[] | ListOfLists]) -> [];
11multi_map(Func, ListOfLists) ->
12    [apply(Func, lists:map({erlang, hd}, ListOfLists)) |
13     multi_map(Func, lists:map({erlang, tl}, ListOfLists))].
14