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

(.def .public documentation
  (.List $.Module)
  ($.module /._
            "Functionality for working with tuples (particularly 2-tuples/pairs)."
            [($.default /.equivalence)
             ($.default /.hash)

             ($.definition /.left
               "The left side of a pair.")

             ($.definition /.right
               "The right side of a pair.")

             ($.definition /.curried
               "Converts a 2-argument function into nested single-argument functions."
               [(curried f)])

             ($.definition /.uncurried
               "Converts nested single-argument functions into a 2-argument function."
               [(uncurried f)])

             ($.definition /.swapped
               ""
               [(swapped [left right])])

             ($.definition /.then
               "Apply functions to both sides of a pair."
               [(then f g)])

             ($.definition /.forked
               "Yields a pair by applying both functions to a single value."
               [(forked f g)])]
            []))