 
   ## Aliases
 
-  A set of aliases can be given as second argument:
+  A set of aliases can be given as the 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
+  Extra information about switches can be given as arguments, too.
+  This is useful when 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;
+  * `:boolean` - Marks the given switch as a boolean. Boolean switches
+                 never consume 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
  @doc """
  Parses the argv and returns one tuple with parsed options
  and the arguments.

  ## Examples


  end

  @doc """
  Similar to `parse/2` but only parses the head of `argv`;
  as soon as it finds a non-switch, it stops parsing.

  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)
