once = (fn) => {
  isFunction(fn)
  let called = false
  /**
   * @type {R}
   */
  let result

  /**
   * @type {(...args: A[]) => R}
   */
  return (...args) => {
    if (!called) {
      result = fn(...args)
      called = true
    }
    return result
  }
}
@see https://youmightnotneed.com/lodash#once
@template A
@template R
@param {(...args: A[]) => R} fn
@returns {(...args: A[]) => R}