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.
I used the above image to build an SVG and inline it in the description. See fork
Approved.
The first part is here
My understanding (which may be wrong) of the second part is that
tee
simply returns new iterables which create their ownStopIteration
exception, rather than it erasing data from the originalStopIteration
exception and reraising it.send
in Python is a method of generators, and not of iterables, which is why it is "removed" (becausetee
accepts and returns iterables, not specifically generators). In JS the equivalent ofsend
is simply the argument tonext
, and is therefore a part of theiterable
protocol. It of course doesn't make sense for a cloned iterable to pass on any sent values, so the option would either be to just ignore any sent values, or have solutions enforce no sent value by requiring they throw an error or something.This makes sense if the aim is to exactly mimic
itertools.tee
. But if the aim is to simply "clone" iterators, then it seems logical to me that if the original iteratorreturn
s a value, then so should its clones. But I agree that either way it should be tested.Fixed
There are 5 ways of taking four out of five numbers ( numbers at different indices are treated as different ).
Not bad. You spelt "corresponding" wrong. The difficulty is talking around the implied solution ..
It was that mischievous dinglerat wasnt it. He's always up to no good.
I had a go at Completely reworking the description. Let me know what you think. Anyone can feel free to fork this to make further improvements.
The description is very badly worded. It is combinations (not permutations) and combinations are made not by values, but by indexes. So a
0
at position1
is considered different to a0
at position2
.Python Fork
@it
blocks (this makes it look like lots changed in full tests, but that is mostly just indent)Very nice kata btw :)
Reminds me of Monty Hall problem for some reason. These probability problems do my head in.
Yeah I thought it might have been a very deliberate choice
Loading more items...