Add more explicit error handling for mismatched groupings
This commit is contained in:
@ -57,7 +57,12 @@ levelOrderToString = (\s : toLineString (levelOrderTraversal s))
|
||||
flatten = foldl (\acc x : lconcat acc x) ""
|
||||
flatLOT = (\s : lconcat (t 10 t) (flatten (levelOrderToString s)))
|
||||
|
||||
exampleOne = flatLOT [("1") [("2") [("4") t t] t] [("3") [("5") t t] [("6") t t]]]
|
||||
exampleTwo = flatLOT [("1") [("2") [("4") [("8") t t] [("9") t t]] [("6") [("10") t t] [("12") t t]]] [("3") [("5") [("11") t t] t] [("7") t t]]]
|
||||
exampleOne = flatLOT [("1")
|
||||
[("2") [("4") t t] t]
|
||||
[("3") [("5") t t] [("6") t t]]]
|
||||
|
||||
exampleOne
|
||||
exampleTwo = flatLOT [[("1")
|
||||
[("2") [("4") [("8") t t] [("9") t t]] [("6") [("10") t t] [("12") t t]]]
|
||||
[("3") [("5") [("11") t t] t] [("7") t t]]]
|
||||
|
||||
exampleTwo
|
||||
|
Reference in New Issue
Block a user