Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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...



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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: