export function chainw<State>(...args: any[]) {
  if (
    args[1] instanceof Array ||
    args[1] instanceof Set ||
    args[1] === undefined