Compute how many nodes in a tree satisfy the given predicate.
predicate
import {tree, from, of, countOf} from 'effect-tree'import {pipe} from 'effect'const actual = pipe( [of(2), from(3, of(4), of(5)), of(6)], tree.flipped(1), countOf(n => n % 2 === 0),)expect(actual).toBe(3) Copy
import {tree, from, of, countOf} from 'effect-tree'import {pipe} from 'effect'const actual = pipe( [of(2), from(3, of(4), of(5)), of(6)], tree.flipped(1), countOf(n => n % 2 === 0),)expect(actual).toBe(3)
Compute how many nodes in a tree satisfy the given
predicate.