Implementation and Sub-specifications
Please hover over different parts of the implementation to see the corresponding sub-specifications.
import numpy
import operator
def f(l):
return g2(g1(l))
f([1, 2, 3, 4]) = [-, -, -, -]
def g1(l):
return list(map(numpy.reciprocal, l))
g1([-1, -2, -3, -4]) = [-, -, -, -]
def g2(l):
return list(map(operator.neg, l))
g2([, , , ]) = [-, -, -, -]