`fun isFavorite(otherIceCream: IceCream) = iceCrea...
# getting-started
s
fun isFavorite(otherIceCream: IceCream) = iceCream == otherIceCream
What is going on in this syntax? We have one equality operator and another is assignment.
f
Yeah I'm not a huge fan of the "fun(...) = " syntax either, you could read this as:
Copy code
fun isFavorite(other: IceCream) {
    return iceCream == otherIceCream
}
d
Some languages like Dart use
=>
in this case which makes it a bit clearer imho. Would look like this in your example:
Copy code
fun isFavorite(otherIceCream: IceCream) => 
        iceCream == otherIceCream
s
iceCream == otherIceCream
Does this mean return true if they are equal or false otherwise.
f
yup
✔️ 1