Ad
  • Custom User Avatar

    Oh, that's a great use of lazy! Thanks for the suggestion, will apply it to the solution :)

  • Custom User Avatar

    Great solution. However, you can still be more expressive than this in Swift. Like:
    !"abcdefghijklmnopqrstuvwxyz".lazy.map(string.lowercased().contains).contains(false)
    And it should be a bit faster, because you don't need to iterate over the whole input, just all the letters in the alphabet. And thanks to lazy, it should stop the first time it gets false.