aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/data/collection/row.lux
blob: b2f6615eb63e2b9f656c683589528521c68913ed (plain)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
(.module:
  [library
   [lux {"-" list}
    ["$" documentation {"+" documentation:}]
    [control
     ["<>" parser
      ["<[0]>" code]]]
    [data
     ["[0]" text {"+" \n}
      ["%" format {"+" format}]]]
    [macro
     [syntax {"+" syntax:}]
     ["[0]" code]
     ["[0]" template]]]]
  [\\library
   ["[0]" /]])

(documentation: (/.Row it)
  "A sequential data-structure with fast random access.")

(documentation: /.suffix
  ""
  [(suffix val row)])

(documentation: /.within_bounds?
  "Determines whether the index is within the bounds of the row."
  [(within_bounds? row idx)])

(documentation: /.item
  ""
  [(item idx row)])

(documentation: /.has
  ""
  [(has idx val row)])

(documentation: /.revised
  ""
  [(revised idx f row)])

(documentation: /.prefix
  ""
  [(prefix row)])

(documentation: /.list
  ""
  [(list row)])

(documentation: /.member?
  ""
  [(member? equivalence row val)])

(documentation: /.row
  "Row literals."
  [(: (Row Nat)
      (row 12 34 56 78 90))])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..Row
             ..suffix
             ..within_bounds?
             ..item
             ..has
             ..revised
             ..prefix
             ..list
             ..member?
             ..row
             ($.default /.empty)
             ($.default /.size)
             ($.default /.index_out_of_bounds)
             ($.default /.of_list)
             ($.default /.empty?)
             ($.default /.equivalence)
             ($.default /.mix)
             ($.default /.monoid)
             ($.default /.functor)
             ($.default /.apply)
             ($.default /.monad)
             ($.default /.reversed)
             ($.default /.every?)
             ($.default /.any?)]
            []))