Programming-Idioms

History of Idiom 78 > diff from v28 to v29

Edit summary for version 29 :

Version 28

2015-09-05, 13:24:26

Version 29

2015-09-05, 13:25:06

Idiom #78 "do while" loop

Execute a block once, then execute it again as long as boolean condition c is true.

Idiom #78 "do while" loop

Execute a block once, then execute it again as long as boolean condition c is true.

Code
do_while c b = do a <- b; if c a
                          then do_while c b
                          else return a

do_while (=="") getLine
Code
doowhile c b = do a <- b; if c a
                          then doowhile c b
                          else return a

doowhile (=="") getLine