 public func accept<Element>(_ element: Element) -> Parser<Element, Element>
     where Element: Equatable
 {
-    return acceptIf(predicate: { $0 == element },
-                    errorMessageSupplier: { e in "expected \(element) but found \(e)" })
+    return acceptIf(errorMessageSupplier: { e in "expected \(element) but found \(e)" }) {
+        $0 == element
+    }
 }
 
 /// Create a parser that accepts a single character and returns the parsed character (i.e. `char`).

    -> Parser<Element, Element>
    where Element: Equatable
{
    return acceptIf(predicate: predicate,
                    errorMessageSupplier: { e in "\(kind) expected" })
}

/// Create a parser that accepts a single input element and returns the parsed element (i.e. `element`).

///   - element: The input element to be tested.
///   - invalidElement: The input element which did not satisfy the predicate.
///
public func acceptIf<Element>(
    errorMessageSupplier: @escaping (_ invalidElement: Element) -> String,
    _ predicate: @escaping (_ element: Element) -> Bool
)
    -> Parser<Element, Element>
{
    return accept()
        .filter(errorMessageSupplier: errorMessageSupplier,
                predicate)
}

/// Create a parser that accepts a single input element that satisfies a given predicate,
