         return (.Match(match: headText + tailMatch, index: headIndex), tailRemainder)
         
     case (.Tagged, _):
-        return (tailResult, tailRemainder)
-        
-    case (.Series, _):
-        return (.Failure, tailRemainder)
-    }
-}
-
-func combineSequenceTagged(headTagged: [String: Result], tailResult: Result, tailRemainder: Remainder) -> ResultWithRemainder {
-
-    switch (tailResult, tailRemainder) {
-        
-    case (.Failure, _):
+        return parsedTail
+        
+    case let (.Series, tailRemainder):
+        return (.Failure, tailRemainder)
+    }
+}
+
+func combineSequenceTagged(headTagged: [String: Result], parsedTail: ResultWithRemainder) -> ResultWithRemainder {
+
+    switch parsedTail {
+        
+    case let (.Failure, tailRemainder):
         return (.Failure, tailRemainder)
         
     case let (.Match(match: _, index: _), tailRemainder):

    case let (.Tagged(tailTagged), tailRemainder):
        return (.Tagged(headTagged + tailTagged), tailRemainder)
        
    case (.Series, _):
        return (.Failure, tailRemainder)
    }
}

func parseName(input: Remainder, name: String, sub: Parser) -> ResultWithRemainder {

    let (result, remainder) = sub.parse(input)
    

        case let .Sequence(first, second):
            return parseSequence(input, subs: [first, second])
            
        case let .Tag(tag, sub):
            return parseTag(input, tag: tag, sub: sub)
            
        case let .Deferred(deferred):
            return parseDeferred(input, deferred: deferred)
