You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would be like having guards in case labels in Haskell. Syntax would be something like:
case foo in {
[] :: ... handle empty list ...
[?singleton] where prime(singleton) :: ... handle prime singleton ...
[?head|?tail] :: ... handle other non-empty list cases ...
}
The text was updated successfully, but these errors were encountered:
Implementation, after parsing this structure should be fairly straightforward. As case statements are flattened into nested if statements, the pattern's test can be prepended to the where's conditions, forming the test for that case.
This would be like having guards in case labels in Haskell. Syntax would be something like:
The text was updated successfully, but these errors were encountered: