I'm struggling getting an answer to this:
Define a function functionWF
and functionPath
that takes an FsTree and returns a boolean that check whether the given tree is well-formed as a filesystem and whether the path (represented as a list of strings) is well-formed.
A well-formed filesystem cannot have identical paths leading to different nodes in the tree.
A well-formed path cannot contain nodes with empty names.
bellow a the type FsTree = Node of (string * FsTree) list
and bellow is an example of a FsTree :
fsT = [Node ("f1", [Node ("f2", [])]); [Node ("f3", [])]]