Your first Effect
Effects are descriptions of programs, not the programs themselves. They don't execute until you explicitly run them.
In the anti-pattern, we might think Effects execute immediately. In the Effect way, we understand they're lazy blueprints.
- Use
Effect.succeed(value)to create an Effect that immediately succeeds with a value - Use
Effect.runSync(effect)to execute a synchronous Effect - Remember to import
Effectfrom the 'effect' package
Loading code editor...