Any reason this isn't by_type(Type) -> [ Pid || {Pid, T} <- by_type(), T =:= Type ]. ?