Skip to content

Instantly share code, notes, and snippets.

@sduckett
Last active August 29, 2015 14:24
Show Gist options
  • Save sduckett/0a023a56aa10a2cbc6c0 to your computer and use it in GitHub Desktop.
Save sduckett/0a023a56aa10a2cbc6c0 to your computer and use it in GitHub Desktop.
Kata: Make your own banner!

Make Your Own Banner

The Problem

A friend is having a baby shower, and you’re helping with organizing the event. You’d like to make a banner, but nothing says it quite right, but you find a Make Your Own Banner kit at the store! This kit contains the alphabet, with each letter occuring n-times, based on the frequency of that letter in English text. Will this kit, what phrases can you create? Will it work for the party?

Data

The number of any given letter is based on the frequency of that letter; in English, ‘e’ occurs often, so we get four:

(def four-each [\a \e \f \i \o])
(def three-each [\c \d \g \h \l \n \r \s \t])
(def two-each [\b \j \k \m \p \u \v \w \y \z])
(def one-each [\q \x])

(There were also 6 “bow joiners” - shaped like a bow, as might be placed on a gift - to act as space-characters between words.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment