# Challenge: guess the function

**URL:** <https://discourse.haskell.org/t/challenge-guess-the-function/14587>\
**Category:** Uncategorized\
**Created:** [August 20, 2026, 10:32am UTC](https://discourse.haskell.org/t/challenge-guess-the-function/14587 "2026-08-20T10:32:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![effectfully](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/effectfully/32/3266_2.png) [@effectfully](https://discourse.haskell.org/u/effectfully)\
**Post date:** [August 20, 2026, 10:32am UTC](https://discourse.haskell.org/t/challenge-guess-the-function/14587/1 "2026-08-20T10:32:39Z")

</div>

Made another [challenge](https://github.com/polyvariadic/haskell-challenges/tree/master/j2-guess-function). This one is really easy to understand, but very hard to solve. I’d be surprised to get any non-AI solutions at all tbh.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/haskell/original/2X/a/a8766eda7d1643475b8184f7b42e5d92b5919ffe.jpeg)

---

<div class="post-metadata">

**Author:** ![slow-dive](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/slow-dive/32/5585_2.png) [@slow-dive](https://discourse.haskell.org/u/slow-dive)\
**Post date:** [August 20, 2026, 10:43am UTC](https://discourse.haskell.org/t/challenge-guess-the-function/14587/2 "2026-08-20T10:43:53Z")

</div>

Your link is broken

(and this post has at least 20 characters)

---

<div class="post-metadata">

**Author:** ![effectfully](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/effectfully/32/3266_2.png) [@effectfully](https://discourse.haskell.org/u/effectfully)\
**Post date:** [August 20, 2026, 11:06am UTC](https://discourse.haskell.org/t/challenge-guess-the-function/14587/3 "2026-08-20T11:06:52Z")

</div>

Thanks a lot, fixed. I somehow managed to check that the link is alright and still got it wrong.

---

<div class="post-metadata">

**Author:** ![slow-dive](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/slow-dive/32/5585_2.png) [@slow-dive](https://discourse.haskell.org/u/slow-dive)\
**Post date:** [August 20, 2026, 11:31am UTC](https://discourse.haskell.org/t/challenge-guess-the-function/14587/4 "2026-08-20T11:31:41Z")

</div>

No problem. This seems above my power level though so I think I’m passing on the challenge … however out of curiousity I tried `cabal test` (and `stack test` as well) and both failed to compile `StressTest.hs` for me, not sure if that is expected:

```haskell
test/StressTests.hs:77:43: error: \[GHC-39999\]
• Ambiguous type variable ‘a0’ arising from a use of ‘show’
prevents the constraint ‘(Show a0)’ from being solved.
Probable fix: use a type annotation to specify what ‘a0’ should be.
Potentially matching instances:
instance \[safe\] Show Timeout.Timeout -- Defined in ‘System.Timeout’
instance (Show a, Show b) => Show (Either a b)
-- Defined in ‘ghc-internal-9.1204.0:GHC.Internal.Data.Either’
...plus 29 others
...plus 113 instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the second argument of ‘(.)’, namely ‘show’
In the second argument of ‘(.)’, namely ‘length . show’
In the second argument of ‘(.)’, namely ‘evaluate . length . show’
   |
77 | try . evaluate . length . show $

```

---

<div class="post-metadata">

**Author:** ![effectfully](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/effectfully/32/3266_2.png) [@effectfully](https://discourse.haskell.org/u/effectfully)\
**Post date:** [August 20, 2026, 12:30pm UTC](https://discourse.haskell.org/t/challenge-guess-the-function/14587/5 "2026-08-20T12:30:57Z")

</div>

Yeah that’s fine, it’s because the type of `guess` isn’t specified, which is something any solution should do.
