callWith2<R, U> method

R callWith2<R, U>(
  1. R fn<A, B>(
    1. U
    ), [
  2. U? value
])

Implementation

R callWith2<R, U>(R Function<A, B>(U) fn, [U? value]) {
  assert(args.length == 2);
  return args.first
      .provideTo(<A>() => args[1].provideTo(<B>() => fn<A, B>(value as U)));
}