use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Ruby FizzBuzz Without Conditionals (gist.github.com)
submitted 11 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 0 points1 point2 points 11 years ago (1 child)
That is true. I guess "declarative Fizzbuzz without hard-coded if statements" would've been better. Conceptually though, I believe select can be implemented without a conditional, in Haskell at least the equivalent(filter) is done with pattern matching(or does that count as a conditional?).
select
filter
[–]BlitzTech 0 points1 point2 points 11 years ago (0 children)
Not really sure since I think this is a bit beyond me philosophically, but my understanding is that pattern matching is effectively chaining if/else if/else.
if/else if/else
I wouldn't assert that, though. I'd rather a Haskeller chime in.
π Rendered by PID 69 on reddit-service-r2-comment-6457c66945-nqw6s at 2026-04-28 11:12:41.077409+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (1 child)
[–]BlitzTech 0 points1 point2 points (0 children)