package loop

All checked builds pass
  1. Overview
  2. Docs
Unbounded loops with continues and breaks

Install

dune-project
 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 continueing loops.

By default it will loop infinitely, but it won't get in the way of unbounded exceptions or other unhandled effects

Tags

topics control flow loop loops

Added to opam-repository:

README

loop

A small control-flow utility for unbounded loops with support for break and continueing 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:

  1. start a loop
  2. call continue or break 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 ()
    | _ -> ())

Dependencies (2)

  1. dune >= "3.11"
  2. ocaml >= "5.0"

Dev Dependencies (1)

  1. odoc with-doc

Optional Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building loop with each compiler on check.ci.ocaml.org, run of against opam-repository 8d8d144. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.0.1 (this version) n/a n/a good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure