How can I check that two lambdas are the same oper...
# announcements
t
How can I check that two lambdas are the same operations? For example, the argument of a function is a lambda:
op: (Double, Double) -> Double
and the parameters I will pass could be:
{ op1, op2 -> op1 + op2 }
,
{ op1, op2 -> op1 - op2 }
or
{ op1, op2 -> op1 / op2 }
. So how can I check
op
is equals
\
operation I passed in inside of the method?
a
use either named functions or dedicated type for each operation.