JohnBugner/elm-loop/2.0.2

NOTE: the latest version is 2.1.0

Loop

Repeatedly apply a function to a value.

Looping

while : (a -> Bool) -> (a -> a) -> a -> a

Repeatedly apply a function to a value while a predicate holds.

while (\ n -> n < 10) ((+) 5) 2 == 12
for : Int -> (a -> a) -> a -> a

Repeatedly apply a function to a value n times.

for 3 ((+) 5) 2 == 17