Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

0% Positive

Analyzed from 99 words in the discussion.

Trending Topics

#wrong#output#code#looks#line#numbers#example#correct#familiar#smalltalk

Discussion (4 Comments)Read Original on HackerNews

kemotepabout 3 hours ago
The example output is not correct at all. I am not familiar with Smalltalk’s syntax to say the code is wrong but it looks like Fizzbuzz so why is the output wrong? Skimming back over the post I don’t see them acknowledging this either.

How in the world is that output that wrong based on the code?

sphabout 2 hours ago
What is wrong, looking at the first screenshot? I got confused by the line numbers initially, but looks OK to me. Keep in mind it's counting from 0
kemotepabout 2 hours ago
Wow I thought the line numbers were the number. That makes way more sense. Clearly need to slow down when I am reading.
weare138about 1 hour ago
Just for reference, in case anyone was wondering, this is what it should be outputting:

  perl -E 'say for map { ( $_ % 3 ? "" : 'fizz' ) . ( $_ % 5 ? "" : 'buzz' ) || $_ } 1..shift' 42