aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/control/concurrency/frp.lux
blob: 2500b119de2f05940a71e0b77ec8e0260baf427c (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
(.module:
  [library
   [lux (#- if loop)
    ["$" documentation (#+ documentation:)]
    [data
     [text (#+ \n)
      ["%" format (#+ format)]]]
    [macro
     ["." template]]]]
  [\\library
   ["." /]])

(documentation: /.Channel
  "An asynchronous channel to distribute values.")

(documentation: /.Sink
  "The tail-end of a channel, which can be written-to to fee the channel.")

(documentation: /.channel
  "Creates a brand-new channel and hands it over, along with the sink to write to it."
  [(channel _)])

(documentation: /.Subscriber
  "A function that can receive every value fed into a channel.")

(documentation: /.only
  (format "Produces a new channel based on the old one, only with values"
          \n "that pass the test.")
  [(only pass? channel)])

(documentation: /.of_async
  "A one-element channel containing the output from an async."
  [(of_async async)])

(documentation: /.fold
  "Asynchronous fold over channels."
  [(fold f init channel)])

(documentation: /.sequential
  "Transforms the given list into a channel with the same elements."
  [(sequential milli_seconds values)])

(.def: .public documentation
  (.List $.Module)
  ($.module /._
            ""
            [..Channel
             ..Sink
             ..channel
             ..Subscriber
             ..only
             ..of_async
             ..fold
             ..sequential
             ($.default /.channel_is_already_closed)
             ($.default /.functor)
             ($.default /.apply)
             ($.default /.monad)
             ($.default /.subscribe!)
             ($.default /.aggregates)
             ($.default /.poll)
             ($.default /.periodic)
             ($.default /.iterations)
             ($.default /.distinct)
             ($.default /.list)]
            []))