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