Skip to content

optics #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

optics #8

wants to merge 14 commits into from

Conversation

valdo404
Copy link

Provide monads exercises

Laurent Valdes and others added 14 commits January 28, 2025 21:55
The tutorial covers:
1. Basic Lenses for product types
2. Prisms for sum types
3. Optionals for optional values
4. Traversals for collections
5. Real-world example combining all concepts
Added TODO comments and placeholders for students to complete:
1. Basic lens creation and composition exercises
2. Prism implementation for sum types
3. Optional composition for safe navigation
4. Traversal creation with filtering
5. Complex real-world example with bonus exercise

Each exercise includes:
- Clear instructions and hints
- Test cases to verify solutions
- Increasingly complex challenges
- Added @main annotation
- Used section and exercise from exercise_tools
- Replaced implemented code with |>? placeholders
- Improved section naming to match other tutorials
- Removed hints to make it more challenging
- Kept check statements for verification
- Structured exercises consistently with other files
1. Fixed traversal filter using proper filter method
2. Fixed prism construction in bonus exercise
3. Updated imports to use * for Scala 3 style
1. Fixed engineering salary raise by moving filter to departments level
2. Added proper decimal rounding for total calculation
- Replaced implemented code with ?? placeholders
- Fixed total calculation to include quantities
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.

1 participant