Live data from Hacker News

Functional Language Features in Rust – Iterators and Closures

rust-lang.github.io

41–42 of 42 posts

Re: Functional Language Features in Rust – Iterators and Closures

#41

Please don't take over my Cmd+Left arrow key for going back, Chrome already took away my backspace :(

This is an upstream issue with https://github.com/azerupi/mdBook , you should file a bug!

Couldn't find an open issue, but agreed that navigation should not be triggered when a modifier key is pressed, so I opened one: https://github.com/azerupi/mdBook/issues/224

Re: Functional Language Features in Rust – Iterators and Closures

#42

That was really well written. As I was reading through the example code in the section about closures let add_one = |x| x + 1; let five = add_one(4); I thought to myself "hmm I wonder what happens if I were to call the code with a float rather than an int?" Answered my question a few paragraphs down. Kudos. Is it possible to write a generic closure? i.e something that would add 1 to any numeric type.

The whole new Rust Book is quite well written. It was my first resource when I read it a few months ago and I found it easy to understand everything it covered - even lifetimes which I completely failed to get from the original book or other online resources. I look forward to the rest of the chapters being filled in.

[deleted]
Post reply on HN