src/zip2With.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import PII from "./pii"
import unwrap from "./unwrap"

export default <A, B, C>(
  fn: (a: A, b: B) => C,
  a: PII<A> | A,
  b: PII<B> | B,
): PII<C> => PII(fn(unwrap(a), unwrap(b)))