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.
There are also even tools for making your own solutions in this style: https://pointfree.io/
It's not very odd, by Haskell standards it's rather benign ;-)
Here's what's it all about: https://wiki.haskell.org/Pointfree
I wonder why its written in such an odd way. Are you people just flexing on me with your hasklel skills? Or is there an actual reason?
nice solve
didn't know that it could be this short!
That should be cheating, lol.
nice and short solve
yup, still can't make sense of it after understanding the solutions.
past or present denominators, or defaults
That line, paraphrased / decoded / whatever:
(l+r)/(m+s)is each new fraction (next iteration), before substitution and simplification. Letl/mrepresent whatever the fraction was, just before you most recently parsed anLchoice. Letr/srepresent whatever the fraction was, just before you most recently parsed anRchoice.This is how values of
l, r, m, sare obtained most often. Butl = 1, r = 0, m = 0, s = 1are defaults, used when there is no previously parsed L or R (or neither, as shown in the way that the initial1/1, corresponding to the empty string, is formed entirely out of them).HTH
Same here, I took my notebook and wrote the numbers, the fractions, tried to find a pattern but nothing. I'm not quite following the explanation, this is a problem that most likely would be solved in lets say 10-15 lines maybe, but man I can't even find the logic. If someone can explain it I would appreciate it a lot.
javascript translation added and made description language-agnostic
approved some while ago
Clever, but this code is less readable than if you split it into several functions with explicit names.
this image should really be in the description
Yesn't,
Charis an instance ofOrdwhere the characters are ordered by their unicode codepoint. It does not really "threat them as they were numbers" but deep down at some point everything is an int eventually.Loading more items...