ccapndave / elm-typed-tree / TreePath.Data

This module represents the data held at the node of a tree. Each node can have either branch or leafdata, so this data can be either of those.

Definition


type Data b l
    = BranchData b
    | LeafData l

Represent a value that may either be Branch of Leaf data (where each has its own type, parameterised by b and l.

Unwrappers

getBranchData : Data b l -> Maybe b

If the given data is branch data then unwrap it.

getLeafData : Data b l -> Maybe l

If the given data is leaf data then unwrap it.