     return pa.map(a2b)
   }
 
-  public static func <¢ (a: A, p: Parser<()>) -> Parser {
+  public static func <¢ <B>(a: A, p: Parser<B>) -> Parser {
+    return const(a) <¢> p
+  }
+
+  public static func ¢> <B>(p: Parser<B>, a: A) -> Parser {
     return const(a) <¢> p
   }
 }
 
-extension Parser { // : Alt
-  public static func <|> (lhs: Parser, rhs: Parser) -> Parser { // : Alt
-    return Parser<A> { route in
-      lhs.parse(route) ?? rhs.parse(route)
-    }
-  }
-}
+// MARK: - Apply
 
-extension Parser { // : Apply
-  public static func <*> <B>(pa2b: Parser<(A) -> B>, pa: Parser) -> Parser<B> { // : Apply
+extension Parser {
+  public static func <*> <B>(pa2b: Parser<(A) -> B>, pa: Parser) -> Parser<B> {
     return Parser<B> { route in
       guard let (more, a2b) = pa2b.parse(route) else { return nil }
       guard let (rest, a) = pa.parse(more) else { return nil }

  }
}

extension Parser { // : Plus
  public static var empty: Parser {
    return Parser { _ in nil }
  }
}

public func pure<A>(_ a: A) -> Parser<A> { // : Applicative
  return Parser<A> { route in
    (route, a)
  }
}

public let end = Parser<()> { route in
  guard route.path.isEmpty else { return nil }

  guard let components = request.url.flatMap({ URLComponents(url: $0, resolvingAgainstBaseURL: false) })
  else { return (method, [], [:]) }

  let path = components.path.components(separatedBy: "/")
    |> mapOptional { $0.isEmpty ? nil : $0 }

  var query: [String: String] = [:]
  components.queryItems?.forEach { query[$0.name] = $0.value ?? "" }
