Challenge: guess the function

Made another challenge. 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.

5 Likes

Your link is broken

(and this post has at least 20 characters)

1 Like

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

1 Like

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:

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 $
1 Like

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

1 Like