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.
In the Haskell version of the problem, you use both Int and Integer:
countBy :: Integer -> Int -> [Integer]
Why mix Int and Integer in the types? I think they should both be the same.
Here's a test case that uses random integer lists. (I forget the syntax to make it work for any list of Eq.)
It'd help a lot if you could explain that
<>
is a new synonym formappend
(I don't think it was originally the case, right?)I searched for
<>
with Hoogle, and it couldn't find this synonym:http://www.haskell.org/hoogle/?hoogle=%3C%3E
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Why does this say the Haskell binary monoid operator is
<>
? I thought it wasmappend
?I would love to build on this to make a Unicode-safe version of the question!
Example Unicode-safe solution in Haskell at http://www.codewars.com/kata/reviews/54179e681d3bf3e16b000009/groups/542f4bbcd002f889540008a6 .