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

Function getSemigroupEvery

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

Source from the content-addressed store, hash-verified

157 * @since 0.24.0
158 */
159export const getSemigroupEvery = <A>(): Semigroup<Predicate.Predicate<A>> =>
160 semigroup.make<Predicate.Predicate<A>>(
161 Predicate.and,
162 (self, collection) => (a) => {
163 if (!self(a)) {
164 return false
165 }
166 for (const p of collection) {
167 if (!p(a)) {
168 return false
169 }
170 }
171 return true
172 }
173 )
174
175/**
176 * @category instances

Callers 1

getMonoidEveryFunction · 0.85

Calls 2

makeMethod · 0.65
pFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…