(environment, seq)
Return the first item of a sequence.
Return the first item of a sequence.
Return the first item of a sequence .
def do_first(environment, seq):
    """Return the first item of a sequence."""
    try:
        return next(iter(seq))
    except StopIteration:
        return environment.undefined('No first item, sequence was empty.')
def do_first ( environment , seq ) : try : return next ( iter ( seq ) ) except StopIteration : return environment . undefined ( 'No first item, sequence was empty.' )