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.
BangPatterns
was not doing anything in the end, used it before pattern matching and forgot to remove it.This comment is hidden because it contains spoiler information about the solution
Doesn't the code
violate the strict-aliasing rule whenever
shape
isn't actually a pointer to an object of typeshape_t
?Wouldn't
union
aliasing be the correct way to do this?(I'm quite new to C so this might sound as a dumb question, I'm still trying to understand type aliasing and how to do it right.)
This comment is hidden because it contains spoiler information about the solution
This solution works for
base >= 4.11.0 && < 5
(will probably still be valid forbase >= 5
, but that doesn't exist as of the time of writing this)C# solution template has the wrong method name (should be UpperCamelCase intead of lowerCamelCase)
Why not use
fromIntegral
?This will fail in one way or another for any enumerable which has more than int.MaxValue elements(and enumerated to that point). Other than that it seems ok :D.
EDIT: Just to clarify, depending on the context, this might either skip a lot of elements, or throw an arithmetic overflow exception
Quite pointless imo
nice recursive algorithm, and given that ints are at most 10 digits long, you won't run into a stack overflow from that recursion :D.
Same issue as haugk, cesare63 and arnitoj, you need to derive an instance of Applicative(and Functor) for your NIM type if you want a Monad instance.
Shouldn't the product of 0 numbers be 1?
Test cases assume a certain ordering of Set(HashSet) objects, which should not be done, either replace with SortedSet(TreeSet) or remove entirely.
implementing mergesort using quicksort, seems legit.
Haskell test problem?
Why would item no' -1 be in page 0?
Loading more items...