ninetynine-1.3.0: Ninety-Nine Haskell Problems
CopyrightCopyright (C) 2021 Yoo Chung
LicenseGPL-3.0-or-later
Maintainerdev@chungyc.org
Safe HaskellSafe-Inferred
LanguageGHC2021

Solutions.P61

Description

Some solutions to Problems.P61 of Ninety-Nine Haskell Problems.

Synopsis

Documentation

leaves :: Tree a -> [a] Source #

Collect the leaves of a binary tree in a list. A leaf is a node with no successors.

internals :: Tree a -> [a] Source #

Collect the internal nodes of a binary tree in a list.