Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You get the
Number
type, but not the constructor ( note that you do get the deconstructor ).No, you are not supposed to use the constructor. Not a kata issue.
I'm not sure I understand the issue here.
Mapping
"()"
to a leaf, and"(()())"
toLeaf :*: Leaf
can work, but you still have to deal with all strings, including""
. That's the puzzle: you need to figure out a representation that handles every possible string.If we only kept the
parensToTree (treeToParens Tree)
test case that would only show that treeToParens is a surjection, not a bijection. You need the other test to show it's a bijection.I tried using the constructor and ran into this, too.
You don't need the constructor, though.
The kata is solvable with just the provided imports, so I don't think this is an issue.