package spin

  1. Overview
  2. Docs
OCaml project generator

Install

Dune Dependency

Authors

Maintainers

Sources

spin-0.8.0.tbz
sha256=2d612f7a55a2cd71177e96c6a5a5d3a7c258b19b4eef9cf994a24b1ec77c3764
sha512=1b46b047c6f3d3ed38ba38912680e2af802517f30d27ae42ceca4fa1b3954d28ba6922535a322230a57e466f009df499823b39a325f476a9bf938fa2e0cd8f4a

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.