Iterators - Rust

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 พ.ย. 2024

ความคิดเห็น • 7

  • @penguinmonk7661
    @penguinmonk7661 3 ปีที่แล้ว +1

    very nice explanation, new Rustacean and having someone explain this clear and concise was a GOD SEND for my project

  • @ClearerThanMud
    @ClearerThanMud 4 ปีที่แล้ว +4

    iter() takes a bunch of values which are spread across space, and spreads them across time.
    collect() does the reverse: it takes values spread across time, and spreads them across space.

  • @ClearerThanMud
    @ClearerThanMud 4 ปีที่แล้ว +4

    A note for viewers: Dan is showing you the brute force way of writing an Iterator for the Fibonacci function, which is important for understanding what an Iterator is. But when you need to write one yourself, there are helper functions that make things easier in many cases:
    github.com/rust-itertools/itertools/issues/430

  • @imaliazhar
    @imaliazhar 3 ปีที่แล้ว

    That was a great concise explanation. Thank you!

  • @myhendry
    @myhendry 4 ปีที่แล้ว +1

    Thank you. Clear and crisp

  • @thisismyalias
    @thisismyalias 4 ปีที่แล้ว +2

    Great stuff, you've just earned a sub. Keep the content coming! (: