Jump to content

Non-decimal radices/Convert: Difference between revisions

→‎ES6: (updated primitive – replaced recursive until with iterative until)
(→‎ES6: (updated primitive – replaced recursive until with iterative until))
Line 1,574:
// until :: (a -> Bool) -> (a -> a) -> a -> a
const until = (p, f, x) => {
constlet gov = x => p(x) ? x : go(f(x));
returnwhile go(x!p(v)) v = f(v);
return v;
}
 
9,659

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.