Brandon Williams - Seemingly Impossible Swift Programs

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

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

  • @jeremysaklad6703
    @jeremysaklad6703 2 ปีที่แล้ว

    `Int` could definitely conform to `CaseIterable` using lazy collections, and you could then implement `anySatisfy` for it. Whether you could *run* it in a reasonable amount of time is another matter.

  • @AlessandroMartin-iOS
    @AlessandroMartin-iOS 5 ปีที่แล้ว +2

    Nice talk by Brandon as usual! Just a little technical issue: left audio channel is totally dead :)

    • @johngoogle6574
      @johngoogle6574 5 ปีที่แล้ว

      Well the guy is in the lower right side :p

  • @ulysses4536
    @ulysses4536 5 ปีที่แล้ว +1

    Well.. one could define the same method for String, where it would find a string having particular properties by recursively building that string. It would die with stack overflow pretty soon, but would definitely work the same way.
    I'm trying to say, the bitfield infinity and String infinity are pretty much similar, with the former being constructed from a much smaller vocabulary. Actually, big integers can be treated similarly.

  • @OtherTheDave
    @OtherTheDave 5 ปีที่แล้ว

    Seems like it’d be faster to implement `allSatisfy` in terms of `anySatisfy` than the other way around. Eh, maybe not... depends on whether the predicate is more likely to return false or true.