Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/FizzBuzz/Nix/fizzbuzz.nix
Normal file
17
Task/FizzBuzz/Nix/fizzbuzz.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
with (import <nixpkgs> { }).lib;
|
||||
with builtins;
|
||||
let
|
||||
fizzbuzz = { x ? 1 }:
|
||||
''
|
||||
${if (mod x 15 == 0) then
|
||||
"FizzBuzz"
|
||||
else if (mod x 3 == 0) then
|
||||
"Fizz"
|
||||
else if (mod x 5 == 0) then
|
||||
"Buzz"
|
||||
else
|
||||
(toString x)}
|
||||
'' + (if (x < 100) then
|
||||
fizzbuzz { x = x + 1; } else "");
|
||||
in
|
||||
fizzbuzz { }
|
||||
Loading…
Add table
Add a link
Reference in a new issue