Drop every None and collect the remaining Some values into an array.
None
Some
compact([some(1), none(), some(2)]); // [1, 2] Copy
compact([some(1), none(), some(2)]); // [1, 2]
Drop every
Noneand collect the remainingSomevalues into an array.