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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
very straightforward, like it
I like it, verbose yet performant.
Great kata as usual, nklein :)
Only thing I would add is to state explicitly in the details is that
defmethod
should replace any existing method with that signature rather than being undefined behaviour. I don't recall ifremoveMethod
was used in a method chain in one of the tests, but if it did I would also state that that needs to be chainable as well.Also, could the method names be
defmethod
andundefmethod
oraddMethod
andremoveMethod
? Currently they feel a bit inconsitent.That's fair enough, I guess I was getting caught up in the "shares as many nodes as possible" in the
append
spec and completely ignored the fact that it still needs to be a linked list. :)I'm failing the
l4.remove(first) is l4.tail()
test because I'm pairing lists whenever I append them to prevent unnecessary flattening:In practice, I'm duplicating less data than if I were to flatten the list (I'd need to clone
ca
). Is this something that could be taken into account either in the tests or description by specifying that you must create a flat list when appending? I can cache or flatten the pairs to get around the error, but this seems like a thing others might bump up against as well.