code: function eitherToResult(either) {
    if(isFunction(either)) {
      return function(x) {
        const m = either(x)
  
        if(!isSameType(Either, m)) {
          throw new TypeError('eitherToResult: Either returning function required')
        }
  
        return applyTransform(m)
      }
    }
  
    if(isSameType(Either, either)) {
      return applyTransform(either)
    }
  
    throw new TypeError('eitherToResult: Either or Either returning function required')
  }
docs: eitherToResult : Either e a -> Result e a eitherToResult : (a -> Either e b) -> a -> Result e b