package spin

  1. Overview
  2. Docs
OCaml project generator

Install

Dune Dependency

Authors

Maintainers

Sources

opam-spin-0.8.2.tbz
sha256=4ca1b0cf7fccdbef2e2e8cba47a66333b2ec1535d45792f5d6ddb8d62824a9eb
sha512=fbb209d50f89f9d924626ba1d12b18f22acd7e3e457a5d371668d0bba3ef8e03fb3d0cac55f3e915f030ce77ecd1a48c471f7c83820f95b996b57cee6ff72e92

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.