diff options
author | Eduardo Julian | 2021-08-14 03:09:58 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-08-14 03:09:58 -0400 |
commit | 6fd22846f21b8b70b7867e989109d14a366c0a3e (patch) | |
tree | 9086774968ad944133dc5cf29c546add6e13a4b6 /stdlib/source/library/lux/control/thread.lux | |
parent | e53c1a090eb9cfac3cb23d10d981648d02518ed1 (diff) |
Moved documentation-generation machinery to its own module.
Diffstat (limited to 'stdlib/source/library/lux/control/thread.lux')
-rw-r--r-- | stdlib/source/library/lux/control/thread.lux | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/stdlib/source/library/lux/control/thread.lux b/stdlib/source/library/lux/control/thread.lux index c0a8c5955..266c12afc 100644 --- a/stdlib/source/library/lux/control/thread.lux +++ b/stdlib/source/library/lux/control/thread.lux @@ -31,7 +31,7 @@ (array.write! 0 init) :abstraction))) - (def: .public (read box) + (def: .public (read! box) {#.doc (example "Reads the current value in the box.")} (All [! a] (-> (Box ! a) (Thread ! a))) (function (_ !) @@ -53,7 +53,7 @@ @.php ("php array read" 0 (:representation box)) @.scheme ("scheme array read" 0 (:representation box))}))) - (def: .public (write value box) + (def: .public (write! value box) {#.doc (example "Mutates the value in the box.")} (All [a] (-> a (All [!] (-> (Box ! a) (Thread ! Any))))) (function (_ !) @@ -104,10 +104,10 @@ (function (_ !) ((ffa !) !)))) -(def: .public (update f box) +(def: .public (update! f box) {#.doc (example "Update a box's value by applying a function to it.")} (All [a !] (-> (-> a a) (Box ! a) (Thread ! a))) (do ..monad - [old (read box) - _ (write (f old) box)] + [old (read! box) + _ (write! (f old) box)] (in old))) |