This solution fails for ambiguous sampling.

``````signal = "11111111000000"
discrete = map length . group \$ signal

minimum discrete == 6
foldl' gcd 0 discrete == 2
``````
• ###### NgoKimPhucommented on "Mumbling" typescript solution

There's an option to switch to TypeScript ES6, which supports `String.prototype.repeat`.

• ###### zimmahcommented on "Mumbling" typescript solution

I had the same problem, but it just means there's something else wrong with your code.

Sometimes the errors you get back don't make any sense.

• ###### Unnamedcommented on ""Domino Tiling - 2 x N Board" Haskell Translation"

`prop_ext_eq n k = n >= 1 && n <= 10000 && k >= 1 && k <= 100 ==> twoByN n k == twoByN' n k`
It generates integers by

``````instance Arbitrary Integer where
arbitrary = arbitrarySizedIntegral
shrink    = shrinkIntegral
``````

where

``````arbitrarySizedIntegral =
sized \$ \n ->
inBounds fromInteger (choose (-toInteger n, toInteger n))
``````

first, then checks the constraint, so the upper bound of `n` is about 100 here.

• ###### Unnamedcommented on ""Domino Tiling - 2 x N Board" Haskell Translation"

`prop_ext_eq n k = n >= 1 && n <= 10000 && k >= 1 && k <= 100 ==> twoByN n k == twoByN' n k`
It generates integers by

``````instance Arbitrary Integer where
arbitrary = arbitrarySizedIntegral
shrink    = shrinkIntegral
``````

where

``````arbitrarySizedIntegral =
sized \$ \n ->
inBounds fromInteger (choose (-toInteger n, toInteger n))
``````

first, then checks the constraint, so the upper bound of `n` is about 100 here.

• ###### luochen1990commented on "Last digit of a large number" haskell solution

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