onrails
    Preparing search index...
    • Drop every None and collect the remaining Some values into an array.

      Type Parameters

      • T

      Parameters

      Returns T[]

      compact([some(1), none(), some(2)]);    // [1, 2]