   end
 
   @doc """
-  Similar to parse but only parses the head of the argv.
-  I.e. as soon as it finds a non switch, it stops parsing.
+  Similar to `parse/2` but only parses the head of `argv`;
+  as soon as it finds a non-switch, it stops parsing.
 
-  Check `parse/2` for more info.
+  See `parse/2` for more information.
 
   ## Example
 
       iex> OptionParser.parse_head(["--source", "lib", "test/enum_test.exs", "--verbose"])
       { [source: "lib"], ["test/enum_test.exs", "--verbose"] }
 
+      iex> OptionParser.parse_head(["--verbose", "--source", "lib", "test/enum_test.exs", "--unlock"])
+      {[verbose: true, source: "lib"], ["test/enum_test.exs", "--unlock"]}
   """
   def parse_head(argv, opts // []) when is_list(argv) and is_list(opts) do
     parse(argv, opts, false)


  ## Aliases

  A set of aliases can be given as second argument:

      iex> OptionParser.parse(["-d"], aliases: [d: :debug])
      { [debug: true], [] }

  ## Switches

  Extra information about switches can be given as argument too.
  This is useful in order to say a switch must behave as a boolean
  or if duplicated switches should be kept, overriden or accumulated.

  The following types are supported:

  * `:boolean` - Marks the given switch as boolean. Boolean switches
                 never consumes the following value unless it is
                 true or false;
  * `:integer` - Parses the switch as an integer;
  * `:float`   - Parses the switch as a float;


defmodule OptionParser do
  @moduledoc """
  This module contains functions to parse command line arguments.
  """

  @doc """
  Parses `argv` and returns a tuple with parsed options
  and arguments.

  ## Examples

