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 need to explore "closure"
hahahhaha this is crazy simple solution
i have been searching and calculating for ages
How does it works, what exactly do the $0?
I don't even know how i missed it. Hahaha!
damn. I wanted to write like this... But i thought it was too simple
I can't believe i missed that. Well done !
Why couldn't I think of this solution?
Updated
This works, so I don't see the point of the kata. At least not until you can enforce the task in the tests.
There are no sample tests.
The Swift version uses the default variable name "tape" for the user input string. This is potentially confusing. I would recommend that this be changed to "input" to match the implementation in other languages.
Good catch! Just using
size % 2 == 1
would work.dont need size > 0 in the guard statement do you?
disfunctionning translation. Rejected.