ex 7. while implemented

This commit is contained in:
Aaro Koivukangas
2024-01-12 14:19:49 +02:00
parent 366feac4c0
commit 550352c93e
+1 -1
View File
@@ -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