code: function ap(m, x) {
    if(!((isApplicative(m) || isArray(m)) && isSameType(m, x))) {
      throw new TypeError('ap: Both arguments must be Applys of the same type')
    }
  
    if(isArray(x)) {
      return array.ap(m, x)
    }
  
    return x.ap(m)
  }
docs: ap :: Applicative m => m a -> m (a -> b) ->  m b