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_pointer/weak_pointer.ml.html
Source file weak_pointer.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
(* We implement a weak pointer using a [Weak_array.t]. *) open! Base type 'a t = 'a Weak_array.t let create () = Weak_array.create ~len:1 (* We use a weak array of length 1, so the weak pointer is at index 0. *) let index = 0 let get t = Weak_array.get t index let sexp_of_t sexp_of_a t = [%sexp (get t : a Heap_block.t option)] let is_none t = Weak_array.is_none t index let is_some t = Weak_array.is_some t index let set t block = Weak_array.set t index (Some block)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>