package spin

  1. Overview
  2. Docs
OCaml project generator

Install

Dune Dependency

Authors

Maintainers

Sources

opam-spin-0.8.1.tbz
sha256=cd1ca43c7d3bb11be0b525642e57aa98e4d8250aea6c2fdb5c70b120449abdc1
sha512=0ff1e8886a49773d8ead3a21df1fb46697954fb43e875bd1ddc4cb95542fe0a767c556c432d78b47654a1f3d361800c234486e4cc237b9aa8d4df22e5a3a1ff9

doc/src/spin.std/list.ml.html

Source file list.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
include Stdlib.List

let index f t =
  let rec aux acc = function
    | [] ->
      raise Not_found
    | el :: rest ->
      if f el then
        acc
      else
        aux (acc + 1) rest
  in
  aux 0 t
OCaml

Innovation. Community. Security.