defmodule Util do def typeof(a) do cond do is_float(a) -> "float" is_number(a) -> "number" is_atom(a) -> "atom" is_boolean(a) -> "boolean" is_binary(a) -> "binary" is_function(a) -> "function" is_list(a) -> "list" is_tuple(a) -> "tuple" true -> "idunno" end end end