Copyright | Copyright (C) 2021 Yoo Chung |
---|---|
License | GPL-3.0-or-later |
Maintainer | dev@chungyc.org |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Part of Ninety-Nine Haskell Problems. Some solutions are in Solutions.P72.
Synopsis
- postOrderSequence :: MultiwayTree a -> [a]
Documentation
postOrderSequence :: MultiwayTree a -> [a] Source #
Construct the post-order sequence of the tree nodes.
Examples
>>>
postOrderSequence multitree5
"gfcdeba"
Notes
The problem in the original list specifies a "bottom-up" order. There is no widespread common understanding of what this is (i.e., does this mean post-order, or all nodes at a level being sequenced before nodes at a higher level?), so post-order is specified instead.