def first(self, predicate=None):
        '''The first element in a sequence (optionally satisfying a predicate).

        If the predicate is omitted or is None this query returns the first
        element in the sequence; otherwise, it returns the first element in
        the sequence for which the predicate evaluates to True. Exceptions are
        raised if there is no such element.

        Note: This method uses immediate execution.

        Args:
            predicate: An optional unary predicate function, the only argument
                to which is the element. The return value should be True for
                matching elements, otherwise False.  If the predicate is
                omitted or None the first element of the source sequence will
                be returned.

        Returns:
            The first element of the sequence if predicate is None, otherwise
            the first element for which the predicate returns True.

        Raises:
            ValueError: If the Queryable is closed.
            ValueError: If the source sequence is empty.
            ValueError: If there are no elements matching the predicate.
            TypeError: If the predicate is not callable.
        '''
        if self.closed():
            raise ValueError("Attempt to call first() on a closed Queryable.")

        return self._first() if predicate is None else self._first_predicate(predicate)