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