Category: FizzBuzz

Formally proving FizzBuzz for fun and profit, part 4.

Last time we created the data type FizzBuzzProofSimple, which represents possible FizzBuzz values and created a few instances of it by hand. The next step is to write a function for generating FizzBuzzProofSimple instances from any number automatically. Making Proofs First we’re going to need functions to make DivisiblebyX instances. These functions need to: Take […]

Formally proving FizzBuzz for fun and profit, part 2.

Last time we introduced FizzBuzz and the Idris language. The problem with our last solution (shown below) was that it combined determining what the output should be with actually creating the output strings. This time we’ll be fixing this by add Algebraic Data types and Interfaces. Algebraic Data Types Algebraic data types are types composed […]