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.
i thnk than the secondtest is wrong, in the set of minor words say "The In" should will be"the in"!?, whatever Anyway, with all the cases that I tried it works but when I want to send it I get an error but I don't know which is the test that makes my code fail
Personally, I had the basic idea right away... stacking partially applied functions and using something like id as the initial value, but I couldn't get the form right and resorted to looking it up in the wiki. I guess I cheated, but I plan to come back to this one in the future and see if I can get it without peeking.
I didn't build the Haskell vesion of this kata. I will attempt to reach out to the creator since Haskell is very literally a different language to me.
In the Haskell version of the problem, you use both Int and Integer:
countBy :: Integer -> Int -> [Integer]
I'm not sure what "types" you are referring to. Can you be more specific?
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.)
.
.
Not new, it's in
base
http://hackage.haskell.org/package/base-4.7.0.1/docs/Data-Monoid.html#v:-60--62-
Hayoo search:
http://hayoo.fh-wedel.de/?query=%28%3C%3E%29
I have since added a new Kata: Hughes' List. This uses a technique very similar to the one required here and may be a little bit easier to solve than this one.
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
It could use a handful of tests.
It's an infix synonym: http://hackage.haskell.org/package/base-4.7.0.1/docs/Data-Monoid.html#v:-60--62-
You can search the haskell docs with Hayoo!
http://hayoo.fh-wedel.de/
Yes.
Loading more items...