Hacker News new | ask | show | jobs
by iopq 2939 days ago
Usually you return a closure with impl Fn. Another use case is to return an iterator.

I wrote a post about it. Let me know if it helps.

https://medium.com/@iopguy/impl-trait-in-rust-explanation-ef...

1 comments

Your code is nothing but Magic . I have spent time trying to wrap my head around it. I am almost there but I don't understand .map(<&str>::into) . Monoid implements String
Finally, that code is itched in my brain