def myFunction(a,b,c):
return lambda x: a * x ** 2 + b * x + c
however I am not understanding what is wrong with
Copy code
fun potentialEnergy(charge1, charge2, k){
val x = {position: Double -> k * charge1 * charge2 / position / position} // creating lambda function
return x
}
What is wrong with this lambda function expression.