code: function foldMap(fn, m) {
    if(!isFunction(fn)) {
      throw new TypeError(
        'foldMap: Function returning Semigroups of the same type required for first argument'
      )
    }
  
    if(isArray(m)) {
      return _array.foldMap(fn, m)
    }
  
    if(m && isFunction(m.foldMap)) {
      return m.foldMap(fn)
    }
  
    throw new TypeError(
      'foldMap: Non-empty Foldable with at least one Semigroup required for second argument'
    )
  }
docs: foldMap :: Foldable f, Semigroup s => (a -> s) -> f a -> s