I was eventually able to get it, but I think a link to a reference around monads would be helpful. I'm trying to understand them better myself, but unfortunately it's a lot of stuff like this where it's more or less "do monads" with no helpful instruction as to how to learn the concept. If I had any good ones I'd share, but still looking... Maybe they're Just Nothing ;)
Addtionally, it took me way to long to figure out that the greaterThan function was inverse of how I first thought about it, could update the description with an example: greaterThan 5 -- True, the number you need to guess is greater than 5
I like it :)
Pretty frustrating that you basically have to to know that a certain function exists in order to do this...
Neither the description nor the example are very helpful for someone like myself who isn't well versed in graph theory.
By the definition given, where a cycle is a permutation with two elements swapped, then the example would have way more than 3
That's 5 permutations right there with only two elements "trading places with one another".
Ahh, yea, my bad. Haskell
It might be obvious from the syntax but it's best to say which language you're working in so people can help debug.
I don't understand what
means, so I can't fix my code :(
I was eventually able to get it, but I think a link to a reference around monads would be helpful. I'm trying to understand them better myself, but unfortunately it's a lot of stuff like this where it's more or less "do monads" with no helpful instruction as to how to learn the concept. If I had any good ones I'd share, but still looking... Maybe they're Just Nothing ;)
Addtionally, it took me way to long to figure out that the greaterThan function was inverse of how I first thought about it, could update the description with an example:
greaterThan 5 -- True, the number you need to guess is greater than 5