diff options
author | Eduardo Julian | 2022-06-12 18:28:30 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-06-12 18:28:30 -0400 |
commit | 94c0bc5d12ed44540543bd6772d357baeb32bb45 (patch) | |
tree | ee3db9030bc4794019c3b4e43e5dda24e73bc33d /stdlib/source/documentation | |
parent | 616ce8051f59f956fedc57780f5a8fefa16dd61d (diff) |
De-sigil-ification: suffix : [Part 5]
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/documentation/lux/control/concurrency/actor.lux | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/stdlib/source/documentation/lux/control/concurrency/actor.lux b/stdlib/source/documentation/lux/control/concurrency/actor.lux index 174ff4718..fb84a5b1f 100644 --- a/stdlib/source/documentation/lux/control/concurrency/actor.lux +++ b/stdlib/source/documentation/lux/control/concurrency/actor.lux @@ -54,22 +54,25 @@ .let [_ (debug.log! "AFTER")]] (in output))) - (message: .public (push [value a] state self) - (List a) - (let [state' {.#Item value state}] - (async.resolved {try.#Success [state' state']})))) + (def: .public push + (message (_ [value a] state self) + (List a) + (let [state' {.#Item value state}] + (async.resolved {try.#Success [state' state']}))))) (actor: .public counter Nat - (message: .public (count! [increment Nat] state self) - Any - (let [state' (n.+ increment state)] - (async.resolved {try.#Success [state' state']}))) + (def: .public count! + (message .public (_ [increment Nat] state self) + Any + (let [state' (n.+ increment state)] + (async.resolved {try.#Success [state' state']})))) - (message: .public (read! state self) - Nat - (async.resolved {try.#Success [state state]}))))] + (def: .public read! + (message (_ state self) + Nat + (async.resolved {try.#Success [state state]})))))] (documentation: /.actor: (format "Defines a named actor, with its behavior and internal state." \n "Messages for the actor must be defined after the on_mail handler.") @@ -83,7 +86,7 @@ ((on_mail message state self) (message (++ state) self)))]) - (documentation: /.message: + (documentation: /.message (format "A message can access the actor's state through the state parameter." \n "A message can also access the actor itself through the self parameter." \n "A message's output must be an async containing a 2-tuple with the updated state and a return value." @@ -115,7 +118,7 @@ ..poison! ..actor: ..actor - ..message: + ..message ..Stop ..observe! ($.default /.poisoned) |