Strum355
10/19/2018, 12:23 PMboth functions of type Cat -> Cat and Animal -> Animal can be used wherever a Cat -> Animal was expected.
. Ik its not strictly kotlin related, but kotlin does have the in-out keywords.robstoll
10/19/2018, 12:26 PMNumber
bigger box = Any
smaller box = Int
(as an example)
Or taking your animal example
box = cat
bigger box = animal
smaller box = siamese catStrum355
10/19/2018, 12:35 PMrobstoll
10/19/2018, 12:36 PMrobstoll
10/19/2018, 12:37 PMStrum355
10/19/2018, 12:38 PMrobstoll
10/19/2018, 12:38 PM