What would the return statement look like for a re...
# arrow
k
What would the return statement look like for a return signature
Either<Error, Nothing>
?
s
If you're asking what goes here, the answer is... nothing 😄
Copy code
either<Error, Nothing> {
  // do stuff
  // what goes here?
}
The return type
Nothing
literally means that there is no possible return value. You can loop infinitely, or you can throw an exception, but you are not allowed to reach the end of the code block normally.
a
you would need to end with either a
raise
or an exception
s
This type of return statement fits a polling loop quite well, that never returns (while (true) { ... }) and only throws/raises an error when something goes wrong.