Implements Assignment 4 Part 2-3

Singleton

Uses pattern matching, but could be implemented using length