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 are on the right track, but try starting at the outside and count the chains of 1's as you go in.
Something like
spiralize(7) => 7, 6, 6, 4, 4, 2, 2, 0
The pattern I see initially is the following:
(each # is the length of 1's & 0's alternating)
spiralize(5) === 5 -> 4 -> 4 -> 1 -> 2 -> 3 -> 6
spiralize(10) === 10 -> 9 -> 9 -> 1 -> 2 -> 6 -> 1 -> 1 -> 2 -> 1 -> 4 -> 1 -> 1 -> 1 -> ......
I don't understand the desired pattern, nor is the description helpful in any way.
Can someone please explain the desired pattern more clearly, either the author or someone else as a comment?
This kata has sample tests in which only one function is ever (un)subscribed to, but the behind-the-scenes tests imply that more than one function can be subscribed to at a given moment. Without understanding the structure of how multiple handlers are dealt with (held in an array/obj, constantly adding new 'fn' props, etc), it is impossible to guess how this must be implemented.
Please reword your description to account for this confusion regarding multiple/single handlers (the syntax of some sentences is also confusing).