ZVON > References > Haskell reference
| Indexes | Syntax | >> Prelude << | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random

Module: Prelude
Function: until
Type: (a -> Bool) -> (a -> a) -> a -> a
Description: applies a function which is passed as the second argument to the third argument and it comapares the result with the condition, if the condition evaluates to True, it prints the result, if not, it passes the result to the finction and repeats the cycle as long as the condition is matched
Related:

Example 1

Input: until (> 100) (*2) 1

Output: 128

Example 2

Input: until odd ( `div` 2) 400

Output: 25