File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1493,3 +1493,10 @@ export const difference: {
14931493 2 ,
14941494 < A > ( self : Chunk < A > , that : Chunk < A > ) : Chunk < A > => unsafeFromArray ( RA . difference ( that , self ) )
14951495)
1496+
1497+ /**
1498+ * @category filtering
1499+ * @since 3.19.0
1500+ */
1501+ export const getSomes : < A > ( self : Chunk < Option < A > > ) => Chunk < A > = ( self ) =>
1502+ unsafeFromArray ( RA . getSomes ( toReadonlyArray ( self ) ) )
Original file line number Diff line number Diff line change @@ -887,4 +887,9 @@ describe("Chunk", () => {
887887 assertEquals ( Chunk . difference ( curr , Chunk . empty ( ) ) , Chunk . empty ( ) )
888888 assertEquals ( Chunk . difference ( curr , curr ) , Chunk . empty ( ) )
889889 } )
890+
891+ it ( "getSomes" , ( ) => {
892+ assertEquals ( Chunk . getSomes ( Chunk . empty ( ) ) , Chunk . empty ( ) )
893+ assertEquals ( Chunk . getSomes ( Chunk . make ( Option . some ( 1 ) , Option . none ( ) ) ) , Chunk . of ( 1 ) )
894+ } )
890895} )
You can’t perform that action at this time.
0 commit comments