funny cheat :-)
You could've avoided to_str, to_ary, to_hash check if defined method_missing as self.method_missing. In this case it will be defined for main object only, instead of being defined for Object as a class
to_str
to_ary
to_hash
method_missing
self.method_missing
main
Object
But no one wants do do these :'( This kata has stuck in beta for 200 days
Need more pure number theory kata like this.
.
Haskell translation
Indeed. Nice job!
Done, thanks!
( for JS ) In the random tests, you should pass in copies of arr (.slice() is your friend) rather than the arr itself.
arr
.slice()
Thanks! I've fixed it.
This comment is hidden because it contains spoiler information about the solution
Loading collection data...
funny cheat :-)
You could've avoided
to_str
,to_ary
,to_hash
check if definedmethod_missing
asself.method_missing
. In this case it will be defined formain
object only, instead of being defined forObject
as a classBut no one wants do do these :'(
This kata has stuck in beta for 200 days
Need more pure number theory kata like this.
.
Haskell translation
Indeed. Nice job!
Done, thanks!
( for JS )
In the random tests, you should pass in copies of
arr
(.slice()
is your friend) rather than thearr
itself.Thanks! I've fixed it.
This comment is hidden because it contains spoiler information about the solution