def heado(x, coll):
    if not isinstance(coll, tuple):
        raise EarlyGoalError()
    if isinstance(coll, tuple) and len(coll) >= 1:
        return (eq, x, coll[0])
    else:
        return fail
x is the head of coll
dataset/ETHPy150Open logpy/logpy/logpy/goals.py/heado