mapInt
write a function that, given a List of integers xs and a function f:Int->Int, returns a List of integers whose i-th element is f xs[i]
Function Signature
def mapInt(xs:List Int)(f:Int->Int):List Int
Theorem Signature
theorem mapInt_correct(xs:List Int)(f:Int->Int)
: (mapInt xs f).length=xs.length
∧ ∀ i:Fin xs.length, (mapInt xs f)[i]! = f xs[i]
Please log in or register to submit a solution for this challenge.