singleton = Singleton

(<:>) :: a -> NonEmptyList a -> NonEmptyList a
x <:> xs = Cons x xs

instance Functor NonEmptyList where
  fmap f (Singleton a) = Singleton (f a)
  fmap f (Cons x xs)   = Cons (f x) (fmap f xs)
