Working through the Eloquent Javascript book