Seq recursive pattern matching