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

Function mergeTrees

packages/printer/src/internal/docTree.ts:442–449  ·  view source on GitHub ↗
(trees: ReadonlyArray<DocTree.DocTree<A>>)

Source from the content-addressed store, hash-verified

440}
441
442const mergeTrees = <A>(trees: ReadonlyArray<DocTree.DocTree<A>>): DocTree.DocTree<A> => {
443 if (trees.length === 0) {
444 return empty
445 }
446 const head = trees[0]!
447 const tail = trees.slice(1)
448 return tail.length === 0 ? head : concat(trees)
449}
450
451const tree = <A>(
452 parser: () => DocTreeParser<DocStream.DocStream<A>, DocTree.DocTree<A>>

Callers

nothing calls this directly

Calls 1

concatFunction · 0.70

Tested by

no test coverage detected