DoWhileDo

1.1.0

do-while-do & do-until-do Loops (a Swift µ-Library)
capnslipp/DoWhileDo

What's New

1.1.0

2022-12-28T10:50:11Z

Renamed project/module/files doWhileDo→DoWhileDo (upper titlecase, like every other package/project/module). 23c97a4...0ef8dba

Minor:

  • Setting CURRENT_PROJECT_VERSION on project instead of target c4adf48

Full Changelog: 1.0.1...1.1.0

DoWhileDo

DoWhileDo is a Swift micro-library that provides do-while-do and do-until-do loops.

The do-while-do design pattern is a variation of the while loop that executes a block of statements at least once before checking a condition. It can be useful in situations where you want to ensure that a block of statements is executed at least once, even if the condition is false from the start.

One situation where the do-while-do design pattern might be useful is when you want to repeatedly perform an operation until a certain condition is met, but you need to perform some setup or initialization before the condition can be checked.

For example, you might use a do-while-do loop to read lines from a file until you reach the end of the file, with the first block of statements reading a line from the file and the second block of statements checking if the end of the file has been reached.

Another example might be when you want to repeatedly prompt the user for input until they enter a valid response. In this case, the first block of statements might display a prompt and read the user's input, while the second block of statements checks if the input is valid.

Description

  • Swift Tools 5.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sun Jan 22 2023 20:31:55 GMT-0500 (GMT-05:00)