Skip to content

Commit

Permalink
Fix for carp-lang#1437
Browse files Browse the repository at this point in the history
  • Loading branch information
AZMCode authored Oct 28, 2022
1 parent 106bcaa commit 8c67e36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/Control.carp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ other higher order concepts.")
result))

(doc iterate-until "Like `iterate`, but f is applied repeatedly until the predicate `pred` is true.")
(sig iterate-until (Fn [(Ref (Fn [b] b c) d), (Ref (Fn [b] Bool c) e), b] b))
(sig iterate-until (Fn [(Ref (Fn [b] b c) d), (Ref (Fn [(Ref b f)] Bool c) e), b] b))
(defn iterate-until [f pred start]
(let-do [result start]
(while (not (~pred result))
(while (not (~pred &result))
(set! result (~f result)))
result))

Expand Down

0 comments on commit 8c67e36

Please sign in to comment.