   @type __module__  :: atom
   @type __client__  :: function
 
-  @type stack       :: [{atom, atom, any}]
+  @type stack       :: [{atom, atom, any} | {atom, atom} | {:fn, (t -> t)} | {:fn, (t,stack -> t)}]
 
   @type t :: %__MODULE__{
             method:     method,

    run(env, stack)
  end

  def prepare(module, stack) do
    Enum.map stack, fn
      {name, opts}              -> prepare_module(module, name, opts)


defmodule Tesla.Client do
  @type t :: %__MODULE__{
            fun:  (Tesla.Env.t, Tesla.Env.stack -> Tesla.Env.t) | nil,
            pre:  Tesla.Env.stack,
            post: Tesla.Env.stack
  }
