functionFactory name onSingle onMultiple = func
  where
    func []     = wrongNumberArgsFor name
    func (x:[]) = onSingle $ x
    func xs     = onMultiple xs
functionFactory name onSingle onMultiple = func
  where
    func []     = wrongNumberArgsFor name
    func (x:[]) = onSingle $ x
    func xs     = onMultiple xs
functionFactory name onSingle onMultiple = func
  where
    func []     = wrongNumberArgsFor name
    func (x:[]) = onSingle $ x
    func xs     = onMultiple xs