MCPcopy Index your code
hub / github.com/Effect-TS/effect / getSemigroupSome

Function getSemigroupSome

packages/typeclass/src/data/Predicate.ts:132–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130 * @since 0.24.0
131 */
132export const getSemigroupSome = <A>(): Semigroup<Predicate.Predicate<A>> =>
133 semigroup.make<Predicate.Predicate<A>>(
134 Predicate.or,
135 (self, collection) => (a) => {
136 if (self(a)) {
137 return true
138 }
139 for (const p of collection) {
140 if (p(a)) {
141 return true
142 }
143 }
144 return false
145 }
146 )
147
148/**
149 * @category instances

Callers 1

getMonoidSomeFunction · 0.85

Calls 2

makeMethod · 0.65
pFunction · 0.50

Tested by

no test coverage detected