this post was submitted on 12 Dec 2023
855 points (96.4% liked)

Memes

45659 readers
1459 users here now

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

founded 5 years ago
MODERATORS
855
6÷2(1+2) (programming.dev)
submitted 11 months ago* (last edited 11 months ago) by wischi@programming.dev to c/memes@lemmy.ml
 

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 :)

you are viewing a single comment's thread
view the rest of the comments
[–] pomodoro_longbreak@sh.itjust.works 18 points 11 months ago (1 children)

Meanwhile programmers will be like, fools, clearly 2(n) is a function 😏

[–] fallingcats@discuss.tchncs.de 2 points 11 months ago (1 children)

I don't know a single language that lets you use a name starting with a number for anything off the top of my head

[–] deadbeef79000@lemmy.nz 5 points 11 months ago (1 children)
[–] Lilac@lemmygrad.ml 1 points 11 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