You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Case { description = "Empty tree"
, preorder = ""
, inorder = ""
, expected = Just Leaf
}
Reasons:
the BinaryTree type already supports empty trees, so expecting Nothing is redundant
empty list is a valid inorder and preorder traversal for an empty tree, so expecting Nothing is misleading, as it indicates that an error has occured.
A recursive implementation of treeFromTraversals naturally outputs Just Leaf on empty inputs, thus, satisfying the tests requires an awkward wrapper function.
The text was updated successfully, but these errors were encountered:
At Exercism we use our Community Forum, not GitHub issues, as the primary place for discussion. That allows maintainers and contributors from across Exercism's ecosystem to discuss your problems/ideas/suggestions without them having to subscribe to hundreds of repositories.
This issue will be automatically closed. Please use this link%20the%20%60BinaryTree%60%20type%20already%20supports%20empty%20trees,%20so%20expecting%20%60Nothing%60%20is%20redundant%0D%0A2)%20empty%20list%20is%20a%20valid%20inorder%20and%20preorder%20traversal%20for%20an%20empty%20tree,%20so%20expecting%20%60Nothing%60%20is%20misleading,%20as%20it%20indicates%20that%20an%20error%20has%20occured.%0D%0A3)%20A%20recursive%20implementation%20of%20%60treeFromTraversals%60%20naturally%20outputs%20%60Just%20Leaf%60%20on%20empty%20inputs,%20thus,%20satisfying%20the%20tests%20requires%20an%20awkward%20wrapper%20function.&category=haskell ) to copy your GitHub Issue into a new topic on the forum, where we look forward to chatting with you!
If you're interested in learning more about this auto-responder, please read this blog post.
I feel like the first test of "satellite"
should be
Reasons:
BinaryTree
type already supports empty trees, so expectingNothing
is redundantNothing
is misleading, as it indicates that an error has occured.treeFromTraversals
naturally outputsJust Leaf
on empty inputs, thus, satisfying the tests requires an awkward wrapper function.The text was updated successfully, but these errors were encountered: