Logo

Programming-Idioms

History of Idiom 131 > diff from v14 to v15

Edit summary for version 15 by Alekzcb:
[Haskell] typo

Version 14

2017-09-21, 17:11:57

Version 15

2017-09-21, 17:12:06

Idiom #131 Successive conditions

Execute f1 if condition c1 is true, or else f2 if condition c2 is true, or else f3 if condition c3 is true.
Don't evaluate a condition when a previous condition was true.

Idiom #131 Successive conditions

Execute f1 if condition c1 is true, or else f2 if condition c2 is true, or else f3 if condition c3 is true.
Don't evaluate a condition when a previous condition was true.

Extra Keywords
else switch case
Extra Keywords
else switch case
Code
if c1then f1
else if c2 then f2
else f3
Code
if c1 then f1
else if c2 then f2
else f3
Doc URL
https://wiki.haskell.org/If-then-else
Doc URL
https://wiki.haskell.org/If-then-else