Logo

Programming-Idioms

History of Idiom 78 > diff from v15 to v16

Edit summary for version 16 by :

Version 15

2015-09-05, 13:12:08

Version 16

2015-09-05, 13:12:50

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
dowhile c b = do a <- b
  if (c a) then dowhile c b else return a

dowhile (/="END") getLine
Code
dowhile c b = do a <- b
  if c a then dowhile c b else return a

dowhile (/="END") getLine