Skip to content

Instantly share code, notes, and snippets.

@isaac-weisberg
Last active October 19, 2019 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaac-weisberg/9fc5190e84d95bf675336cbdbde49bfd to your computer and use it in GitHub Desktop.
Save isaac-weisberg/9fc5190e84d95bf675336cbdbde49bfd to your computer and use it in GitHub Desktop.
private enum BusinessLogicError: Error {
case downloadError(ForecastDownloadError)
case temperatureInvalid(Double)
}
struct MainViewModel {
/* implementation omitted, but includes
the logic of validating the temperature */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment