Is there a way to pass two functions at the same t...
# getting-started
d
Is there a way to pass two functions at the same time via a lambda I have a following code
Copy code
rollButton.setOnClickListener { rollDice(diceImage1)}
but want to call rollDice twice, with two different arguments e.g.
Copy code
rollButton.setOnClickListener { rollDice(diceImage1) rollDice(diceImage2)}
k
Sure, that should just work? You're allowed to put any code you want in a lambda.
d
@karelpeeters I'm getting an uresolved reference error for the second rollDice fun
k
Well you need a semicolon or an enter between the two calls.
👍 4
d
@karelpeeters thanks a lot