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.
Whii you used foldl :/
Ouch. Right. I forgot that.
This comment is hidden because it contains spoiler information about the solution
100 tests * 0.5sec = 50sec. That is too long.
It is satisfctory, but I wish it could give more thorough explanation and type replacements.
Especially, how each part of it works. (And what actually is a profunctor)
For
fib 1e5
I can reproduce that.fib 1e6
takes serious time to compute though. But with those preposterous results, that might just be BigInt computations, not so much Fibonacci ones.I think the
O(logn)
is only for building function tree, actualfib
calculation would takeO(n)
.I wonder how its expressiveness compares with other languages.
Hmmm.. usage of
head
here irks me.Wait, was
split
package supported here? Was my entire life a joke?Why is this best practice? Isn't it a bit verbose and slow?