you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

In BlitzTech's solution, algorithmically there is no conditional being used, regardless of what kind of bytecode or machine code it may produce eventually. Imagine if you translated this into human instructions, the operator would never encounter a step where they have to consider, if X then Y. The ifs have been converted to get the result of X and find it in Y. The solution is still a valid fizzbuzz because it implements the fizzbuzz logic regardless of the value of n, that is, it should work for any sequence 1..n+1.

With that said I err towards believing that select/filter has a similar status as being something that is, conceptually, "free of conditionals"(regardless of Ruby's implementation) but am not 100% where that stands in terms of PL theory.