Live streamed another episode of Advent of Code in Rust on Twitch
Advent of code in Rust - solving day 4/2021
https://youtu.be/8ev5b_76gWM
In this episode, we completed day 4 of Advent of Code y2021 using Rust!
In today's challenge we needed to simulate a game of Bingo (against a giant squid 🦑) and figure out which board would win first (part I) and last (part II).
The solution wasn't particularly complicated but it was a great exercise to get to play around with few interesting concepts.
We used `filter_map` (https://doc.rust-lang.org/core/iter/trait.Iterator.html#method.filter_map) over a vector of reference as a quick way to be able to filter out the winning boards dynamically.
We also got to play a bit with iterator chaining (https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.chain).
If you have any suggestion, we'd love to hear it, so please leave a comment or a create a PR!
For all the source code check out the official GitHub repo: https://github.com/lmammino/rust-advent
For seeing the next episodes live check out our Twitch channel: https://twitch.tv/loige