(self: Chunk<Option<A>>)
| 1155 | * @since 2.0.0 |
| 1156 | */ |
| 1157 | export const compact = <A>(self: Chunk<Option<A>>): Chunk<A> => { |
| 1158 | const out: Array<A> = [] |
| 1159 | for (const option of self) { |
| 1160 | if (O.isSome(option)) { |
| 1161 | out.push(option.value) |
| 1162 | } |
| 1163 | } |
| 1164 | return fromArrayUnsafe(out) |
| 1165 | } |
| 1166 | |
| 1167 | /** |
| 1168 | * Applies a function to each element in a chunk and returns a new chunk containing the concatenated mapped elements. |
nothing calls this directly
no test coverage detected