True if needle is found in the tree.
needle
Will short-circuit and return immediately if the needle is found.
import {includes, from, of} from 'effect-tree'import {Number} from 'effect'const tree = from(1, of(2), from(4, of(5)))const hasNumber = includes(Number.Equivalence)expect(hasNumber(3)(tree), 'not found').toBe(false)expect(hasNumber(5)(tree), 'found').toBe(true) Copy
import {includes, from, of} from 'effect-tree'import {Number} from 'effect'const tree = from(1, of(2), from(4, of(5)))const hasNumber = includes(Number.Equivalence)expect(hasNumber(3)(tree), 'not found').toBe(false)expect(hasNumber(5)(tree), 'found').toBe(true)
True if
needleis found in the tree.Will short-circuit and return immediately if the needle is found.