     }
     return nil
 }
-
-enum ParseResult<T> {
-    case Default
-    case Error
-    case Result(T)
-
-    func defaultTo(d: T?) -> T? {
-        switch self {
-        case .Default:
-            return d
-        case .Result(let value):
-            return value
-        case .Error:
-            return nil
-        }
-    }
-
-    func overrideWith(possibleOverride: T?) -> T? {
-        if let concreteValue = possibleOverride {
-            return concreteValue
-        }
-        return self.defaultTo(possibleOverride)
-    }
-}

            return .Default
        }
    }

    func counterParser(string: String) -> UInt64? {
        errno = 0

    struct ParsableItem<P> {
        let item: P?

        func with<T>(parser: (P -> T?)) -> ParsedResult<T> {
            if let concrete = item {
                if let value = parser(concrete) {
                    return .Result(value)
