I raise you the compile time calculated fizzbuzz in Nim ;)
proc fizzbuzz(): seq[string] = result = @[] for i in 1..100: result.add( if i mod 15 == 0: "FizzBuzz" elif i mod 5 == 0: "Buzz" elif i mod 3 == 0: "Fizz" else: $i ) const compileTimeValue = fizzbuzz() echo compileTimeValue
Interested in adding this to the collection? 😁
C++20 isn't available yet, but we're a bit closer to this approach. :)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I raise you the compile time calculated fizzbuzz in Nim ;)
Interested in adding this to the collection? 😁
C++20 isn't available yet, but we're a bit closer to this approach. :)