message: feat(system): add matchTag_
diff: @@ -67,6 +67,50 @@ export const pattern: <N extends string>(
  export const matchTag = pattern("_tag")
  +export const pattern_: <N extends string>(
  + n: N
  +) => {
  + <
  + X extends { [k in N]: string },
  + K extends {
  + [k in X[N]]: (
  + _: Extract<X, { [_tag in N]: k }>,
  + __: Extract<X, { [_tag in N]: k }>
  + ) => any
  + }
  + >(
  + m: X,
  + _: K
  + ): Unify<ReturnType<K[keyof K]>>
  + <
  + X extends { [k in N]: string },
  + K extends Partial<
  + {
  + [k in X[N]]: (
  + _: Extract<X, { [_tag in N]: k }>,
  + __: Extract<X, { [_tag in N]: k }>
  + ) => any
  + }
  + >,
  + H
  + >(
  + m: X,
  + _: K &
  + {
  + [k in X[N]]?: (
  + _: Extract<X, { [_tag in N]: k }>,
  + __: Extract<X, { [_tag in N]: k }>
  + ) => any
  + },
  + __: (_: Exclude<X, { _tag: keyof K }>, __: Exclude<X, { _tag: keyof K }>) => H
  + ): Unify<{ [k in keyof K]: ReturnType<NonNullable<K[k]>> }[keyof K] | H>
  +} = (n) =>
  + ((m: any, _: any, d: any) => {
  + return (_[m[n]] ? _[m[n]](m, m) : d(m, m)) as any
  + }) as any
  +
  +export const matchTag_ = pattern_("_tag")
  +
  export const patternFor: <N extends string>(
  n: N
  ) => <X extends { [k in N]: string }>() => {
  