 
     let step = Step(name: description, inFile: filePath, atLine: lineNumber)
 
+    func matchingStep(_ step: UnmatchedStep) -> MatchedStep? {
+      return step.pattern.firstMatch(in: description).map {
+        MatchedStep(arguments: StepArguments($0), function: step.function)
+      }
+    }
+
     return {
       guard let (args, definition) = stepDefinitions.lazy
-        .flatMap({ args -> (StepArguments, StepDefinitionFunc)? in
-          let (pattern, function) = args
-          return pattern.firstMatch(in: description).map {
-            (StepArguments($0), function)
-          }
-        })
+        .flatMap(matchingStep)
         .first
       else { return nil }
 

internal typealias StepActionFunc = () -> Void

open class StepDefinition: QuickSpec {

  // MARK: Step definition API


    }
  }

  private static var stepDefinitions: [UnmatchedStep] = []

}

