JasonShin / fp-core.rs

A library for functional programming in Rust
MIT License
1.35k stars 66 forks source link

lifetime #69

Open nrolland opened 4 years ago

nrolland commented 4 years ago

The lifetime here seem very restrictive

https://github.com/JasonShin/fp-core.rs/blob/4564c429f2ebc89a810f3e064f7db5e76ac68f6e/fp-core/src/semigroup.rs#L2

Shouldn't that be more something like

fn combine(self, other: &Self) -> Self;

JasonShin commented 3 years ago

Thanks for the issue @nrolland, it makes sense to accept a reference for the other param, I will update it soon