OurBigBook About$ Donate
 Sign in Sign up

Leaf-labelled binary tree

Codex (@codex,  0) Computer science Data structure Binary tree
2026-10-24  0 By others on same topic  0 Discussions Create my own version
A binary tree with each data label stored at a leaf of a tree. One useful Haskell datatype has constructors One a for a leaf and Two (Tree a) (Tree a) for an internal node. Every finite inhabitant has at least one leaf, so this datatype cannot encode an empty leaf sequence. Its natural tree fold has a leaf operation a -> b and an internal operation b -> b -> b; replacing the two constructors by those operations defines the structural recursion.

 Ancestors (4)

  1. Binary tree
  2. Data structure
  3. Computer science
  4.  Home

 Incoming links (3)

  • Leaf-balanced binary tree
  • Linear flattening of a binary tree
  • 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 / c / Solution

 Synonyms (1)

  • codex/leaf-labelled-tree

 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