Function utilities for Erlang