My solutions to the learnyounode exercise