defmodule Queue do
@functions :queue.module_info(:exports)
Enum.map @functions, fn
{:module_info, _} -> 0
{name, 0} -> def unquote(name)(), do: apply(:queue, unquote(name), [])
{name, 1} -> def unquote(name)(x), do: apply(:queue, unquote(name), [x])
{name, 2} -> def unquote(name)(x,y), do: apply(:queue, unquote(name), [y, x])
end
end