|
4 | 4 | "kind": 12,
|
5 | 5 | "tags": [],
|
6 | 6 | "detail": "(t<'a>, 'a => 'b) => t<'b>",
|
7 |
| - "documentation": {"kind": "markdown", "value": "`mapReverse xs f`\n\nEquivalent to `reverse (map xs f)`\n\n```ml\n\nmapReverse [3;4;5] (fun x -> x * x) = [25;16;9];;\n```\n\n\n\nbelt_List.mli:299"} |
| 7 | + "documentation": {"kind": "markdown", "value": "`mapReverse xs f`\n\nEquivalent to `reverse (map xs f)`\n\n```ml\nmapReverse [3;4;5] (fun x -> x * x) = [25;16;9];;\n```\n\n\n\nbelt_List.mli:299"} |
8 | 8 | }, {
|
9 | 9 | "label": "makeBy",
|
10 | 10 | "kind": 12,
|
11 | 11 | "tags": [],
|
12 | 12 | "detail": "(int, int => 'a) => t<'a>",
|
13 |
| - "documentation": {"kind": "markdown", "value": "`makeBy n f`\n\n- return a list of length `n` with element `i` initialized with `f i`\n\n\n- return the empty list if `n` is negative\n\n\n\n```ml\n\nmakeBy 5 (fun i -> i) = [0;1;2;3;4];;\nmakeBy 5 (fun i -> i * i) = [0;1;4;9;16];;\n```\n\n\n\nbelt_List.mli:127"} |
| 13 | + "documentation": {"kind": "markdown", "value": "`makeBy n f`\n\n- return a list of length `n` with element `i` initialized with `f i`\n\n\n- return the empty list if `n` is negative\n\n\n\n```ml\nmakeBy 5 (fun i -> i) = [0;1;2;3;4];;\nmakeBy 5 (fun i -> i * i) = [0;1;4;9;16];;\n```\n\n\n\nbelt_List.mli:127"} |
14 | 14 | }, {
|
15 | 15 | "label": "make",
|
16 | 16 | "kind": 12,
|
17 | 17 | "tags": [],
|
18 | 18 | "detail": "(int, 'a) => t<'a>",
|
19 |
| - "documentation": {"kind": "markdown", "value": "`make n v`\n\n- return a list of length `n` with each element filled with value `v`\n\n\n- return the empty list if `n` is negative\n\n\n\n```ml\n\nmake 3 1 = [1;1;1]\n```\n\n\n\nbelt_List.mli:115"} |
| 19 | + "documentation": {"kind": "markdown", "value": "`make n v`\n\n- return a list of length `n` with each element filled with value `v`\n\n\n- return the empty list if `n` is negative\n\n\n\n```ml\nmake 3 1 = [1;1;1]\n```\n\n\n\nbelt_List.mli:115"} |
20 | 20 | }, {
|
21 | 21 | "label": "mapReverse2U",
|
22 | 22 | "kind": 12,
|
|
28 | 28 | "kind": 12,
|
29 | 29 | "tags": [],
|
30 | 30 | "detail": "(t<'a>, 'a => 'b) => t<'b>",
|
31 |
| - "documentation": {"kind": "markdown", "value": "`map xs f`\n\nreturn the list obtained by applying `f` to each element of `xs`\n\n```ml\n\nmap [1;2] (fun x-> x + 1) = [3;4]\n```\n\n\n\nbelt_List.mli:222"} |
| 31 | + "documentation": {"kind": "markdown", "value": "`map xs f`\n\nreturn the list obtained by applying `f` to each element of `xs`\n\n```ml\nmap [1;2] (fun x-> x + 1) = [3;4]\n```\n\n\n\nbelt_List.mli:222"} |
32 | 32 | }, {
|
33 | 33 | "label": "mapWithIndexU",
|
34 | 34 | "kind": 12,
|
|
52 | 52 | "kind": 12,
|
53 | 53 | "tags": [],
|
54 | 54 | "detail": "(t<'a>, t<'b>, ('a, 'b) => 'c) => t<'c>",
|
55 |
| - "documentation": {"kind": "markdown", "value": "`mapReverse2 xs ys f`\n\nequivalent to `reverse (zipBy xs ys f)`\n\n```ml\n\nmapReverse2 [1;2;3] [1;2] (+) = [4;2]\n```\n\n\n\nbelt_List.mli:392"} |
| 55 | + "documentation": {"kind": "markdown", "value": "`mapReverse2 xs ys f`\n\nequivalent to `reverse (zipBy xs ys f)`\n\n```ml\nmapReverse2 [1;2;3] [1;2] (+) = [4;2]\n```\n\n\n\nbelt_List.mli:392"} |
56 | 56 | }, {
|
57 | 57 | "label": "mapWithIndex",
|
58 | 58 | "kind": 12,
|
59 | 59 | "tags": [],
|
60 | 60 | "detail": "(t<'a>, (int, 'a) => 'b) => t<'b>",
|
61 |
| - "documentation": {"kind": "markdown", "value": "`mapWithIndex xs f` applies `f` to each element of `xs`. Function `f` takes two arguments: the index starting from 0 and the element from `xs`.\n\n```ml\n\nmapWithIndex [1;2;3] (fun i x -> i + x) =\n[0 + 1; 1 + 2; 2 + 3 ]\n```\n\n\n\nbelt_List.mli:259"} |
| 61 | + "documentation": {"kind": "markdown", "value": "`mapWithIndex xs f` applies `f` to each element of `xs`. Function `f` takes two arguments: the index starting from 0 and the element from `xs`.\n\n```ml\nmapWithIndex [1;2;3] (fun i x -> i + x) =\n[0 + 1; 1 + 2; 2 + 3 ]\n```\n\n\n\nbelt_List.mli:259"} |
62 | 62 | }, {
|
63 | 63 | "label": "mapReverseU",
|
64 | 64 | "kind": 12,
|
|
0 commit comments