package core_bench

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file partial_array.ml

1
2
3
4
5
6
7
8
9
10
open Core

type 'a t =
  { values : 'a array
  ; mutable len : int
  }
[@@deriving fields]

let create ~values ~len = { values; len }
let map_to_array t ~f = Array.init t.len ~f:(fun i -> f t.values.(i))
OCaml

Innovation. Community. Security.