package loop
Unbounded loops with continues and breaks
Install
Dune Dependency
Authors
Maintainers
Sources
loop-0.0.1.tbz
sha256=2b1ca83ae07257212f4dccd962a33d84a28fa33c792134bb1d2f8b65dff8b2ac
sha512=ae285fd979a47702108fbf30f2d257a7190c308c6ea71e707a9d7cad29d9ed42f469696ff140c75867648450b482b66238ae79b1b4ac051de12dd07685061a9d
Description
A small control-flow utility for unbounded loops with support for break
and
continue
ing loops.
By default it will loop infinitely, but it won't get in the way of unbounded exceptions or other unhandled effects
README
loop
A small control-flow utility for unbounded loops with support for break
and continue
ing loops.
By default it will loop infinitely, but it won't get in the way of unbounded exceptions or other unhandled effects.
Getting Started
opam install loop
Usage
The usage should feel rather natural:
start a loop
call
continue
orbreak
as you see fit
Examples
Here's a small REPL:
let repl () =
let open Loop in
loop (fun () ->
let expr = read () in
let result = eval expr in
print result;
match result with
| Exit -> break ()
| _ -> ())
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page