(no title)
b3orn | 6 months ago
NotFound = 404,
case Status of
NotFound -> "Not Found";
_ -> "Other Status"
end.
That snippet will return "Other Status" for Status = 400. The Python equivalent of that snippet is a SyntaxError as the first case is a catch all and the rest is unreachable.
No comments yet.