code: function firstToMaybe(first) {
    if(isFunction(first)) {
      return function(x) {
        const m = first(x)
  
        if(!isSameType(First, m)) {
          throw new TypeError('firstToMaybe: First returning function required')
        }
  
        return applyTransform(m)
      }
    }
  
    if(isSameType(First, first)) {
      return applyTransform(first)
    }
  
    throw new TypeError('firstToMaybe: First or First returning function required')
  }
docs: firstToMaybe : First a -> Maybe a firstToMaybe : (a -> First b) -> a -> Maybe b