code: function firstToResult(left, first) {
    if(isFunction(first)) {
      return function(x) {
        const m = first(x)
  
        if(!isSameType(First, m)) {
          throw new TypeError('firstToResult: First returning function required for second argument')
        }
  
        return applyTransform(left, m)
      }
    }
  
    if(isSameType(First, first)) {
      return applyTransform(left, first)
    }
  
    throw new TypeError('firstToResult: First or First returning function required for second argument')
  }
docs: firstToResult : c -> First a -> Result c a firstToResult : c -> (a -> First b) -> a -> Result c b