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.
Go translation
True, changed that & also made test headers more useful.
Oops 🤦
Added
self_init
call and random non-palindromes.It isn't best practice, but because they are passing the literal
0.0
. Instead,0
would work just as well. (Go literals are untyped.)Re: The Go translation
The function's return type should have been
[][2]string
, to match other languages.OCaml translation
Added random tests
Added random test
Same thing here, just ported the JS tests and there weren't random ones.
But if it's ok to add additional tests to a translation, I will.
Good point, added a call
I ported this from JavaScript, which has no random tests.
Is it ok to add additional tests to a translation?
Agreed. Also, in Go a return type of
(int, int)
would be more idiomatic than[2]int
(although more cumbersome to test)Go translation
Go translation
Go translation
Loading more items...