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.
Point one should be good now, the other kata did not show up in my search, that's my bad. (also, really, 6kyu, that seems a bit low, even for a pretty much copy algo from wikipedia kinda problem)
should be good now.
since Term and Operator are from the input, subclassing them isn't going to do much sine the test code won't use the subclass. Putting them in preload anyway may be fine, the user can always just remap the input into data structures they find more ergonomic, but I don't really see the advantage.
The point here is that in all the examples, I use something like
[Term(1), plus, Term(2), plus, Term(3)]
, which means the user could figure out that the two operators are the same operator using the pythonis
operator. However, I want to allow the tests to create operators on the fly, so having someones implementation rely on itwould not work.
The way I am familiar with the terms is that lexxing/scanning/tokenising would be the step of converting some input string into the kind of list I provide, and parsing would then be converting said list into some sort of (potentially lazily created) tree-like structure for evaluation.
Will reword the edge cases sections and remove the suggestion.
Regarding extending the kata, I was debating unary operators, but I found it made the problem statement more complicated than I could sensibly explain, and the solution didn't change all that much, Other more complex constructs would be interesting in order to force more powerful parsing algos than <redacted>, but I would rather make a part 2 with those, I think having a kata just about working with precedence in a general way rather than having a set of operators and defining the precedence for those only is interesting enough. (admittedly, I did forget <redacted> existed when writing it, which maybe makes this kata is a bit too easy).
Regarding binary operators, I mention it in the last sentence of the first paragraph. The
still
should maybe be dropped though, will change.