package core_kernel
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Industrial strength alternative to OCaml's standard library
Install
Dune Dependency
Authors
Maintainers
Sources
core_kernel-v0.16.0.tar.gz
sha256=e37370bad978cfb71fdaf2b1a25ab1506b98ef0b91e0dbd189ffd9d853245ce2
doc/src/core_kernel.weak_array/weak_array.ml.html
Source file weak_array.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
open! Base module Weak = Stdlib.Weak type 'a t = 'a Heap_block.t Weak.t let create ~len = Weak.create len let length t = Weak.length t let set = Weak.set let set_exn t i x = set t i (Option.map x ~f:Heap_block.create_exn) let get = Weak.get let is_some t i = Weak.check t i let is_none t i = not (is_some t i) let to_array t = Array.init (length t) ~f:(fun i -> get t i) let sexp_of_t sexp_of_a t = [%sexp_of: a Heap_block.t option array] (to_array t) let iter t ~f = for i = 0 to length t - 1 do match get t i with | None -> () | Some v -> f (Heap_block.value v) done let iteri t ~f = for i = 0 to length t - 1 do match get t i with | None -> () | Some v -> f i (Heap_block.value v) done let blit ~src ~src_pos ~dst ~dst_pos ~len = Weak.blit src src_pos dst dst_pos len
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>