```erlang <function>(S) -> case inet_db:lookup_socket(S) of {ok, Mod} -> Mod:<function>(S); Error -> Error end. ``` This pattern repeats itself all over the place. It can be replaced by a macro or a higher order function
This pattern repeats itself all over the place. It can be replaced by a macro or a higher order function