Skip to content

Conversation

@kevintc
Copy link
Contributor

@kevintc kevintc commented Apr 28, 2025

/!\ This is a simple translation of the exercices, it could benefit from a broader view on how to implement other concepts from Effect that are not part of the current exercices.

How to review:

  • Consider each exercise
  • See if the translation from fp-ts to Effect is correct
  • Suggest improvements and fixes if needed

@kevintc kevintc force-pushed the convert-to-Effect branch from e6c5383 to 0532cee Compare April 28, 2025 08:46
@FredericEspiau
Copy link

Sure you don't want to either:

  • keep both versions (fp-ts and Effect)
  • create a whole new repository for Effect and keep this one as an archive ?

Because I've often heard people talk about this repo so to me it sounds look like a bit of a landmark for Inato

@kevintc
Copy link
Contributor Author

kevintc commented Apr 28, 2025

Sure you don't want to either:

  • keep both versions (fp-ts and Effect)
  • create a whole new repository for Effect and keep this one as an archive ?

Because I've often heard people talk about this repo so to me it sounds look like a bit of a landmark for Inato

@FredericEspiau, we will probably split the 2 repositories, it's just convenient at first to have both versions while we work on porting the exercices from fp-ts to effect.

// Implement this function using Effect's APIs
pipe(
optionalCountryCode,
Option.match({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Effect equivalent of option.traverse here would be Effect.transposeMapOption that I added recently in Effect 😏 let's use it! :)

kevintc added 2 commits April 30, 2025 16:16
- Removes unused import.
- Corrects Either type parameter order to align with the Effect library's convention.
- Introduces `Effect.transposeMapOption` for simplifying Option transformations.
- Streamlines array traversal using `Option.all` instead of manual reduction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants