@@ -441,6 +441,13 @@ syntax "[" [start] "," [next] ".." "]"
441441
442442---- More utilities
443443
444+||| repeatedly apply f to v until p is True
445+partial
446+until : (a -> Bool) -> (a -> a) -> a -> a
447+until p f v with (p v)
448+ | False = until p f (f v)
449+ | True = v
450+
444451curry : ((a, b) -> c) -> a -> b -> c
445452curry f a b = f (a, b)
446453