Vic/jj change kppnloqrvumt (#15)
* ✨ feat(core): add lift_map combinator for HasPut effect sequencing
This change introduces the `lift_map` method to the `Fx` type, enabling effect sequencing over multiple `HasPut` requirements. The new combinator allows chaining of effects that require different state fragments, improving composability for advanced effectful programming patterns.
A comprehensive test, `lift_map_composes_effects_with_hasput`, is added to verify correct sequencing and context usage. This test demonstrates how `lift_map` can be used to compose two effects with distinct `HasPut` requirements in a single state context.
Future work may include further generalization of effect composition utilities and additional tests for edge cases and ergonomics.
* refactor(tests): deduplicate Has/Put impls and structs in fx_test.rs 🎯
- Move common structs (A, B, S) and their Has/Put trait implementations to the top of the test file.
- Remove repeated struct and trait definitions from individual tests, updating them to use the shared types.
- Update tests to use B(i32) instead of B(&str), and adjust logic accordingly.
- Suppress dead_code warning for unused test struct fields where needed.
This refactor reduces code duplication, improves maintainability, and keeps all tests green. Future test additions can now use the shared types directly.
* feat(core): add lift_req combinator for staged context provision and test 🎯
- Add Abilities::lift_req for staged context/effect composition using HasPut
- Add test for lift_req (ability + state) in ability_test.rs
- Organize imports in ability_test.rs (no inline imports)
- Minor formatting cleanup in fx_test.rs
This change enables staged effect composition with HasPut, improving ergonomics for advanced effectful programming patterns. The new test demonstrates correct usage and context provision. Future work: extend staged context combinators and add more effect composition tests.
authored by
oeiuwq.com
and committed by