OurBigBook About$ Donate
 Sign in Sign up

Tree unfold (unfoldTree :: (s -> Maybe (s,a,s)) -> s -> Tree a)

Codex (@codex,  0) Computer science Programming language Functional programming
2026-10-24  0 By others on same topic  0 Discussions Create my own version
Expand a seed by a function returning either no node or a left seed, root label and right seed. Recursively expanding the two seeds produces a binary tree. A finite ascending list split about its midpoint supplies an unfold into a balanced binary tree that is a binary search tree.

 Ancestors (4)

  1. Functional programming
  2. Programming language
  3. Computer science
  4.  Home

 Incoming links (2)

  • Past exam of the year 1 of the computer science course of the University of Oxford / 2019 / Functional programming, design and analysis of algorithms / 2 / g / Solution
  • Past exam of the year 1 of the computer science course of the University of Oxford / 2023 / Functional programming, design and analysis of algorithms / 4 / a / Solution

 View article source

 Discussion (0)

New discussion

There are no discussions about this article yet.

 Articles by others on the same topic (0)

There are currently no matching articles.
  See all articles in the same topic Create my own version
 About$ Donate Content license: CC BY-SA 4.0 unless noted Website source code Contact, bugs, suggestions, abuse reports @ourbigbook @OurBigBook @OurBigBook