aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/data/sum.lux
blob: dd398e2509940caa9f33784bb0d04af20cb8f0bf (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
(.using
 [library
  [lux (.except left right)
   ["$" documentation (.only documentation:)]
   [data
    [text (.only \n)
     ["%" \\format (.only format)]]]
   [macro
    ["[0]" template]]]]
 [\\library
  ["[0]" /]])

(documentation: /.left
  "Lifts value to the left side of a 2-variant.")

(documentation: /.right
  "Lifts value to the right side of a 2-variant.")

(documentation: /.either
  "Applies a function to either side of a 2-variant."
  [(either on_left on_right)])

(documentation: /.then
  "Applies functions to both sides of a 2-variant."
  [(then on_left on_right)])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            "Functionality for working with variants (particularly 2-variants)."
            [..left
             ..right
             ..either
             ..then
             ($.default /.lefts)
             ($.default /.rights)
             ($.default /.partition)
             ($.default /.equivalence)
             ($.default /.hash)]
            []))