Comparison of Two Effect Programs: `extend` and `extend2`

are these 2 programs equivalent?
https://effect.website/play#e18de007bb98
const extend = <A, E, R>(effect: Effect.Effect<A, E, R>, scope: Scope): Effect.Effect<A, E, Exclude<R, Scope>> =>
  Effect.mapInputContext<A, E, R, Exclude<R, Scope>>(
    effect,
    // @ts-expect-error Type 'Context<Scope | Exclude<R, Scope>>' is not assignable to type 'Context<R>'
    (context) => Context.merge(context, Context.make(Scope, scope))
  )

const extend2 = <A, E, R>(effect: Effect.Effect<A, E, R>, scope: Scope) => Effect.provideService(effect, Scope, scope)
Was this page helpful?