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.
generic, works for lists and for strings (and probably iterables in general)
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
This comment is hidden because it contains spoiler information about the solution
You do not need to be good at haskell to consider this idiomatic.
In my mind this is more about understanding how folds work and not writing their definitions for each individual case.
Similar thing is using map instead of defining your function to iterate over lists in a way that map does it. (I mean writing f = map g instead of f [] = [] and f (x:xs) = g x : f xs)
You get used to it after a while :)
I wouldn't mix idiomatic with something that was used as an implementation standard. The fact that it's short and does the job does not mean it is readable when making a quick code review. I suppose I'll refrain from taking a strong stance untill I'm actually good at haskell
This comment is hidden because it contains spoiler information about the solution
Isn't this more code golf than best practice?
I'm new so it might be it but it doesn't seem too obvious whats happening