An interesting way of solving this google foo bar challenge.