Reputation: 582
I have higher order function:
def calculateFusionRiskContract(postCalc: DataFrame => DataFrame)
How i can set default value for postCalc parameter that just return parameter of postCalc? without any calculation?
def calculateFusionRiskContract(postCalc: DataFrame => DataFrame = ???)
Upvotes: 0
Views: 83
Reputation: 51683
The function that "just returns the parameter" is identity
def calculateFusionRiskContract(postCalc: DataFrame => DataFrame = identity) = ???
Is there a scala identity function?
Upvotes: 6