package core
Industrial strength alternative to OCaml's standard library
Install
Dune Dependency
Authors
Maintainers
Sources
v0.17.0.tar.gz
sha256=b0e23c1b1049e48cbbaa596d49927c66e6026506031bd7f5b485af6e9475b4e3
doc/src/core/queue.ml.html
Source file queue.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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
open! Import include Base.Queue include Test_binary_searchable.Make1_and_test (struct type nonrec 'a t = 'a t let get = get let length = length module For_test = struct let of_array a = let r = create () in (* We enqueue everything twice, and dequeue it once to ensure: - that the queue has the same content as the array. - that it has, in most cases, an interesting internal structure*) for i = 0 to Array.length a - 1 do enqueue r a.(i) done; for i = 0 to Array.length a - 1 do ignore (dequeue_exn r : bool); enqueue r a.(i) done; r ;; end end) module Serialization_v1 = struct let sexp_of_t = sexp_of_t let t_of_sexp = t_of_sexp let t_sexp_grammar = t_sexp_grammar include Bin_prot.Utils.Make_iterable_binable1 (struct type nonrec 'a t = 'a t type 'a el = 'a [@@deriving bin_io] let caller_identity = Bin_prot.Shape.Uuid.of_string "b4c84254-4992-11e6-9ba7-734e154027bd" ;; let module_name = Some "Core.Queue" let length = length let iter = iter let init ~len ~next = init len ~f:(fun _ -> next ()) end) let stable_witness (_ : 'a Stable_witness.t) : 'a t Stable_witness.t = (* Serialization_v1 defines a stable serialization *) Stable_witness.assert_stable ;; end include Serialization_v1 module Stable = struct module V1 = struct type nonrec 'a t = 'a t [@@deriving compare, equal] include Serialization_v1 (* We don't have a [%bin_digest] expect test here because the bin_io is mostly hand written, and [core_queue_unit_tests.ml] has unit tests for specific values. *) let map = map end end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>