• ###### DestyNovacommented on "Unlucky Days" haskell solution

I didn't know you could use a `let` expression like that in a list comprehension... nice!

• ###### Sunderscommented on "They say that only the name is long enough to attract attention. They also said that only a simple Kata will have someone to solve it. This is a sadly story #1: Are they opposite?" haskell solution

False positive in case of
isOpposite "ab" "CD"

• ###### verrchucommented on "Is n divisible by (...)?" haskell solution

nothing crazy here if you are familiar with curyying and composition

• ###### ice1000resolved an issue on "Lensmaker" kata

`to` is intended to be implemented based on `coerce`, so the original author didn't test for it as a standalone function.

There is test for that function now.

• ###### muesli4commented on "Opposites Attract" haskell solution

I was wrong. I don't know what I meant with the second sentence (after all it's two years ago).

• ###### troficommented on "Opposites Attract" haskell solution

@muesli4, can you elaborate on conditions when you expect problems to happen for this solution?
https://downloads.haskell.org/~ghc/6.0/docs/html/base/Data.Int.html states "All arithmetic is performed modulo 2^n, where n is the number of bits in the type."

• ###### troficommented on "Get the Middle Character" haskell solution

The output should be one or 2 characters by removing the same amount of characters from left and right. d is the number to remove from left (or right). n is what is left after removal.

To get the d expression it's easier to look at some examples.

``````"1"      -> "1"  (l = 1, d = 0)
"12"     -> "12" (l = 2, d = 0)
"123"    -> "2"  (l = 3, d = 1)
"1234"   -> "23" (l = 4, d = 1)
"12345"  -> "3"  (l = 5, d = 2)
"123456" -> "34" (l = 6, d = 2)
``````

From here it's hopefully easy to come up with any suitable formula that gives you this property. I used `(l - 1) / 2` :)

• ###### troficommented on "Writing applicative parsers from scratch" haskell solution

Gah! Right you are! I'm too used to workaround priorities before actually reading orginal grammar :)

• ###### muesli4commented on "Writing applicative parsers from scratch" haskell solution

The original grammar is by design parser-friendly. The reason is that every rule starts with and is uniquely identified by a single terminal (`LL(1)` grammar). I didn't want people to struggle with ambiguous expressions and associativity after the biggest part. That could be part of another Kata. ;)

• ###### DestyNovacommented on "Number of People in the Bus" haskell solution

Yeah! I was wondering if this could be done without having to destructure the pair... learning so much from everyone here :)

How did you get this formslas for d and n???!

• ###### skrypalykcommented on "Number of People in the Bus" haskell solution

This comment is hidden because it contains spoiler information about the solution

so Good!!!!!