Converting Effect.gen to Effect.fn: Impact on Performance?

I've been looking into converting all my Effect.gen to Effect.fn. Previously, I was providing deps as such:

const someFn = (arg: number) =>
  Effect.gen(function* () {
    // ...
  }).pipe(Effect.provide(SomeDep));


Effect.fn returns a function that returns the effect, so I'm now doing it as such:
const someFn = (arg: number) => Effect.fn("someFn")(function* () {
    // ...
  })().pipe(Effect.provide(SomeDep));

by providing args in the outer function instead of in the generator function args like in the docs, am I bypassing something that enables the performance gains of switching to .fn?
Was this page helpful?