mirror of
https://github.com/iritmaximus/haskell.git
synced 2026-10-12 19:13:39 +03:00
ex 7. while implemented
This commit is contained in:
+1
-1
@@ -149,7 +149,7 @@ powersList x n = x^n : powersList x (n+1)
|
||||
-- ==> Avvt
|
||||
|
||||
while :: (a->Bool) -> (a->a) -> a -> a
|
||||
while check update value = todo
|
||||
while check update value = if check value then while check update (update value) else value
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- Ex 8: another version of a while loop. This time, the check
|
||||
|
||||
Reference in New Issue
Block a user