 	return .single(option.defaultValue)
 }
 
+/// Attempts to parse a value for the given nullable option from the given
+/// command-line arguments.
+///
+/// Returns either a signal of one value or an error. If no value was specified
+/// on the command line, `nil` is used.
 func <|<T: ArgumentType>(arguments: [String], option: Option<T?>) -> ColdSignal<T?> {
 	var keyIndex = find(arguments, "--\(option.key)")
 	if let keyIndex = keyIndex {

	precedence 150
}

func <*><T, U>(f: T -> U, value: ColdSignal<T>) -> ColdSignal<U> {
	return value.map(f)
}

func <*><T, U>(f: ColdSignal<(T -> U)>, value: ColdSignal<T>) -> ColdSignal<U> {
	return f.combineLatestWith(value)
		.map { (f, value) in f(value) }
}

func <|<T: ArgumentType>(arguments: [String], option: Option<T>) -> ColdSignal<T> {
	var keyIndex = find(arguments, "--\(option.key)")
	if let keyIndex = keyIndex {

	func run(arguments: [String]) -> ColdSignal<()>
}

/// Represents a record of options for a command, which can be parsed from
/// a list of command-line arguments.
///
/// This is most helpful when used in conjunction with the `option` function,
/// and `<*>` and `<|` combinators.
///
/// Example:
///
///		struct LogOptions: OptionsType {
///			let verbosity: Int
///			let outputFilename: String?
///			let logName: String
///
///			static func create(verbosity: Int)(outputFilename: String?)(logName: String) -> LogOptions {
///				return LogOptions(verbosity: verbosity, outputFilename: outputFilename, logName: logName)
///			}
///
///			static func parse(args: [String]) -> ColdSignal<LogOptions> {
///				return create
///					<*> args <| option("verbose", 0, "The verbosity level with which to read the logs")
///					<*> args <| option("outputFilename", "A file to print output to, instead of stdout")
///					<*> args <| option("logName", "all", "The log to read")
///			}
///		}
protocol OptionsType {
	/// Parses a set of options from the given command-line arguments.
	///
