blob: 5d6609d55b462b06e8fe9523ba24c820701eae17 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
definition module StdRoseTree
import StdClass
/** This module defines rose trees.
*/
:: RoseTree a = Node a [RoseTree a]
:: Children a :== a -> [a]
:: PruneDepth :== Int
iteratetree :: !(Children a) a -> RoseTree a
root :: !(RoseTree a) -> a
children :: !(RoseTree a) -> [RoseTree a]
depth :: !(RoseTree a) -> Int
maptree :: (a -> b) !(RoseTree a) -> RoseTree b
prunetree :: !PruneDepth !(RoseTree a) -> RoseTree a
bonsai :: !(RoseTree a) -> RoseTree a | Eq a
paths :: !(RoseTree a) -> [[a]]
|