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'm glad you enjoyed it!
How do we use select when we pass to groupBy multiple functions? What groups exactly do we pass to select (considering that some of the groups are subgroups of the others due to a nested structure we've got when using multiple groupBy)? In the instruction there's a good example with prime/devisible odd/even numbers, but select is left empty.
This comment is hidden because it contains spoiler information about the solution
Thank you very much! Finished it finally.
Read the Input/Output section of the description (it's before the section that specifies all the commands). Input is passed as an optional second argument to the whitespace function, the first argument being the actual program. Ideally the input argument would be a stream, but for the purposes of this kata it's a string.
There gotta be something wrong with the test cases. My program passed 63. But then came:
Testing input functionality
ssstntnttssstsntnttsssttntnttsssttntttssstsntttssstnttttnsttnsttnstnnn
Expected: 123, instead got: 233
ssstntnttssstsntnttsssttntnttsssttntttssstsntttssstnttttnsttnsttnstnnn
Expected: 867, instead got: 233
ssstntnttssstsntnttsssttntnttsssttntttssstsntttssstnttttnsttnsttnstnnn
Expected: 918, instead got: 233
those are identical inputs but different outputs are expected.
Also I don't understand this input at all:
ss stn tntt ssstsn tntt sssttn tntt sssttn ttt ss stsn ttt ss stn ttt tnst tnst tnst nnn
Where 'ssstsn' should be a number, because 'tntt' requires reading a number from the input.
But why it starts with 3 "s" in a row? Or does it mean 'tntt ss stsn'? In this case two commands go in a row and both need a number. Is that possible?
In the instruction there is "(number)" specified after each command that requires reading a number from input (e.g. SPACE (number) Push n onto the stack."). But after "TAB TAB" in Input/Output IMP there is no following "(number)". I've noticed that because in the test case lots of these "tntt".
Please, can anybody help me to clear up all that?