4 ms·
Big fan of fizz buzz. Edited / wrote / collected a (free open source) book titled "FizzBuzz (1, 2, Fizz, 4, Buzz,...) by Example - There's More Than One Way To
by geraldbauer 8y ago
Big fan of fizz buzz. Edited / wrote / collected a (free open source) book titled "FizzBuzz (1, 2, Fizz, 4, Buzz,...) by Example - There's More Than One Way To Do It" [1] in the Yuki & Moto Press incl. functional, object-oriented, code-golf, and many more styles / versions. Happy fizz buzzing.
[1] https://yukimotopress.github.io/fizzbuzz https://yukimotopress.github.io/fizzbuzz
- chrismorgan 8y agoI found it a useful exercise for teaching Rust: https://chrismorgan.info/blog/rust-fizzbuzz.html https://chrismorgan.info/blog/rust-fizzbuzz.html
- tonyedgecombe 8y agoIf you want another I did it purely with Lambdas in C# [1]. [1] https://github.com/tonyedgecombe/functionalfizzbuzz/blob/master/FunctionalFizzBuzz/FunctionalFizzBuzz.cs https://github.com/tonyedgecombe/functionalfizzbuzz/blob/mas...
- sterlind 8y agowow, you weren't kidding. you bootstrapped all your constructs from pure lambda-calculus! I award you Best Use of Dynamic.
- s3m4j 8y agoMy python teacher asked us an implementation of the factorial function. I did almost the same as you, bootstrapping almost every constructs in python lambdas, and then, before handing it to him, I put it all on one line. But I'm a good person, in a comment above that line, I copy pasted the same line with 'lambda' replaced by 'λ'. (I did not use church numerals and there were no strings involved)