https://zeta.one/viral-math/

I wrote a (very long) blog post about those viral math problems and am looking for feedback, especially from people who are not convinced that the problem is ambiguous.

It’s about a 30min read so thank you in advance if you really take the time to read it, but I think it’s worth it if you joined such discussions in the past, but I’m probably biased because I wrote it :)

  • Lilac [she/her]
    link
    fedilink
    arrow-up
    1
    ·
    7 months ago

    Kinda. You can’t define a name, but you can get the compiler to interpret literals as a function. If you have a Num instance for (Integer -> Integer) where,

    fromInteger i = \x -> x * i

    the compiler can interpret integer literals as functions like so

    x = 2(5) :: Integer