Pattern for Providing Input to a Program in Effect Typescript

is providing an input to a program like this a typical pattern? anti-pattern?
const { method, headers, body, query } = req;

const validatedRequest = Schema.decodeUnknownSync(RequestEnvelope)({ method, headers, body, query });
                                                                              
const program = (validRequest: ValidatedRequest) =>
  Effect.gen(function* () {                                                                              
    const result = yield* doStuff(validRequest);

    return result;
  });
                                                                              
const runnable = Effect.provide(
  program(validatedRequest),  // ← is this 'conventional' in Effect? 
  LiveLayer
);
Was this page helpful?