package odoc
OCaml Documentation Generator
Install
Dune Dependency
Authors
Maintainers
Sources
odoc-3.0.0.tbz
sha256=ce84fa7e0cc5f3e8a54e6adeb10826152798b602057b9e46c5ae7e5d5206812b
sha512=9febd413450ca2e3824c9ef7e1c9ae8d8094aa72ed71327a69d8d6b42f6f197b3f3f40d674de0d11fa1242ee0df95c693b5d74467d530704e1339f3a523452f6
doc/src/odoc.odoc_utils/odoc_list.ml.html
Source file odoc_list.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
include List let rec concat_map_sep ~sep ~f = function | [] -> [] | [ x ] -> f x | x :: xs -> let hd = f x in let tl = concat_map_sep ~sep ~f xs in hd @ (sep :: tl) let concat_map f l = let rec aux f acc = function | [] -> rev acc | x :: l -> let xs = f x in aux f (rev_append xs acc) l in aux f [] l let rec filter_map acc f = function | hd :: tl -> let acc = match f hd with Some x -> x :: acc | None -> acc in filter_map acc f tl | [] -> List.rev acc let filter_map f x = filter_map [] f x (** @raise Failure if the list is empty. *) let rec last = function | [] -> failwith "Odoc_utils.List.last" | [ x ] -> x | _ :: tl -> last tl (* From ocaml/ocaml *) let rec find_map f = function | [] -> None | x :: l -> ( match f x with Some _ as result -> result | None -> find_map f l) let rec find_opt p = function | [] -> None | x :: l -> if p x then Some x else find_opt p l let is_empty = function [] -> true | _ :: _ -> false
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>