Refactoring Imperative Effect Code to Functional Style in TypeScript - Effect Community