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.
Two of sample tests are incorrect in Haskell translation:
Should be
cxgdba
anddczxgba
This comment is hidden because it contains spoiler information about the solution
LYAH is quite amazing. It has rather gentle learning curve, gradually introducing new concepts without intimidating readers with too much abstract math. Besides it's free.
Another good one is Real World Haskell, which is also available for free online.
I've also heard great things about Haskell Book, which is in early access now. Haven't read it myself yet, though.
Here is a great repo listing many more Haskell learning resources: https://github.com/bitemyapp/learnhaskell
tail → drop 1
Suppose there are no primes in [m..n]:
find (\(a, b) -> b-a == g) . uncurry zip . (id &&& drop 1) . filter isPrime $ [m..n]
→find (\(a, b) -> b-a == g) . uncurry zip . (id &&& drop 1) $ []
→find (\(a, b) -> b-a == g) . uncurry zip $ ([], [])
→find (\(a, b) -> b-a == g) []
→Nothing
Which is exactly what supposed to happen:
This comment is hidden because it contains spoiler information about the solution
Yep, works fine now. Thanks.
Haskell version of test is asking for
meanVar
:Haskell:
Experiencing the same issue as BalinKingOfMoria and jhfung.
Also:
Meanwhile:
ax^2 + bx = 0
→x(ax + b) = 0
→x = 0
orax + b = 0
→x = 0
orx = -b/a
In Haskell should probably also hide
Numeric
module or justreadInt
andreadDec
from it.