code: function writerToPair(writer) {
    if(isFunction(writer)) {
      return function(x) {
        const m = writer(x)
  
        if(!isWriter(m)) {
          throw new TypeError('writerToPair: Writer returning function required')
        }
  
        return applyTransform(m)
      }
    }
  
    if(isWriter(writer)) {
      return applyTransform(writer)
    }
  
    throw new TypeError('writerToPair: Writer or Writer returning function required')
  }
docs: writerToPair : Monoid m => Writer m a -> Pair m a writerToPair : Monoid m => (a -> Writer m a) -> Pair m b