 	/// nil if there are no more positional arguments.
 	internal func consumePositionalArgument() -> String? {
 		for (index, arg) in rawArguments.enumerate() {
-			switch arg {
-			case let .Value(value):
+			if case let .Value(value) = arg {
 				rawArguments.removeAtIndex(index)
 				return value
-
-			default:
-				break
 			}
 		}
 

	/// list of arguments remaining.
	internal func consumeBooleanFlag(flag: Character) -> Bool {
		for (index, arg) in rawArguments.enumerate() {
			switch arg {
			case let .Flag(flags) where flags.contains(flag):
				var flags = flags
				flags.remove(flag)
				if flags.isEmpty {
					rawArguments.removeAtIndex(index)
				} else {
					rawArguments[index] = .Flag(flags)
				}
				return true

			default:
				break
			}
		}



		while index < oldArguments.count {
			defer { index += 1 }
			let arg = oldArguments[index]

			guard arg == .Key(key) else {
				rawArguments.append(arg)
				continue
			}

			index += 1
			if index < oldArguments.count, case let .Value(value) = oldArguments[index] {
				foundValue = value
				continue
			}

			return .Failure(missingArgumentError("--\(key)"))
		}

		return .Success(foundValue)
