Skip to content

maciejpirog/fizz-buzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fizz-buzz

Dissecting the most difficult trivial programming puzzle

The FizzBuzz problem is said to be notoriously trivial, but it is not. Read the following (in the given order) to understand why:

  • FizzBuzz in Haskell by Embedding a Domain-Specific Language (fizzbuzz.pdf) - Originally published in the Monad.Reader magazine 💔. It describes why the problem is actually an instance of a difficult programming pattern that seems to require either code duplication, information-flow vs. control-flow mismatch, or higher-order functions. Of course, we choose the latter.

  • fizzbuzz.c - A C implementation of the solution proposed in the paper above. (Yes, if you look from the right angle, C is a dependently-typed functional language.)

  • fizzbuzz-semigroup.md - If your inner pedant is still not satisfied, let's ditch the empty list.

Ports

The solution from the Monad.Reader paper has been translated to many different languages by a number of programming languages enthusiasts. For example:

About

Dissecting the most difficult trivial programming puzzle

Resources

Stars

Watchers

Forks

Languages