def intersects(f, x): """Returns a function that returns whether f intersects g at x.
>>> at_three = intersects(square, 3)
>>> at_three(triple) # triple(3) == square(3)
True
>>> at_three(increment)
False
>>> at_one = intersects(identity, 1)
>>> at_one(square)
True
>>> at_one(triple)
False
"""
"""code here"""
I'm stuck....
value = intersects(f, x)
if value == f(x)
Aucun commentaire:
Enregistrer un commentaire