@@ -243,7 +243,7 @@ to the [`handle_event()`](`c:gen_statem:handle_event/4`) callback. The
243243other arguments are the `EventType` and the event dependent `EventContent`,
244244both described in section
245245[_Event Types and Event Content_](#event-types-and-event-content),
246- and the the last argument is the current server `Data`.
246+ and the last argument is the current server `Data`.
247247
248248[_State Enter Calls_](#state-enter-calls) (see that section)
249249are also handled by the event handler and have slightly different arguments.
@@ -323,7 +323,7 @@ _transition actions_:
323323 If `true ` postpone the current event , see section
324324 [_Postponing Events_ ](# postponing -events).
325325
326- - **[`{hibernate , Boolean `](`t :gen_statem :hibernate / 0 `)** -
326+ - **[`{hibernate , Boolean } `](`t :gen_statem :hibernate / 0 `)** -
327327 If `true ` hibernate the `gen_statem `, treated in section
328328 [_Hibernation_ ](# hibernation ).
329329
@@ -512,7 +512,7 @@ the time-out is restarted with the new time and event content.
512512
513513All time - outs have an `EventContent ` that is part of the
514514[_transition action_ ](# transition -actions) that starts the time-out.
515- Different `EventContent`s does not create different time-outs. The
515+ Different `EventContent`s do not create different time-outs. The
516516`EventContent` is delivered to the [_state callback_](#state-callback)
517517when the time-out expires.
518518
@@ -689,7 +689,7 @@ function `code_lock:init(Code)`. This function is expected to return
689689in this case `locked `; assuming that the door is locked to begin with .
690690`Data ` is the internal server data of the `gen_statem `. Here the server data
691691is a [`map ()`](`m :maps `) with key `code ` that stores the correct
692- button sequence , key `length ` store its length , and key `buttons `
692+ button sequence , key `length ` stores its length , and key `buttons `
693693that stores the collected buttons up to the same length .
694694
695695```erlang
@@ -705,7 +705,7 @@ and is ready to receive events.
705705
706706Function [`gen_statem :start_link / 3 ,4 `](`gen_statem :start_link / 3 `)
707707must be used if the `gen_statem ` is part of a supervision tree , that is ,
708- started by a supervisor . Function ,
708+ started by a supervisor . Function
709709[`gen_statem :start / 3 ,4 `](`gen_statem :start / 3 `) can be used to start
710710a standalone `gen_statem `, meaning it is not part of a supervision tree .
711711
@@ -785,7 +785,7 @@ State Time-Outs
785785---------------
786786
787787When a correct code has been given , the door is unlocked and the following
788- tuple is returned from `locked / 2 `:
788+ tuple is returned from `locked / 3 `:
789789
790790```erlang
791791{next_state , open , Data #{buttons := []},
@@ -1035,7 +1035,7 @@ the _event time-out_.
10351035Generic Time-Outs
10361036-----------------
10371037
1038- The previous example of _state time-outs_ only work if the state machine stays
1038+ The previous example of _state time-outs_ only works if the state machine stays
10391039in the same state during the time-out time. And _event time-outs_ only work
10401040if no disturbing unrelated events occur.
10411041
@@ -1150,7 +1150,7 @@ Postponing is ordered by the
11501150[_transition action_](#transition-actions) `postpone`.
11511151
11521152In this example, instead of ignoring button events while in the `open` state,
1153- we can postpone them handle them later in the `locked` state:
1153+ we can postpone them and handle them later in the `locked` state:
11541154
11551155```erlang
11561156...
@@ -1284,7 +1284,7 @@ just need to handle these event-like calls in all states.
12841284...
12851285init(Code) ->
12861286 process_flag(trap_exit, true),
1287- Data = #{code => Code , length = length (Code )},
1287+ Data = #{code => Code , length => length (Code )},
12881288 {ok , locked , Data }.
12891289
12901290callback_mode () ->
@@ -1327,7 +1327,7 @@ state machine. This can be done with the
13271327[`{next_event , EventType , EventContent }`](`t :gen_statem :action / 0 `).
13281328
13291329You can generate events of any existing [type ](`t :gen_statem :action / 0 `),
1330- but the `internal ` type can only be generated through action `next_event `.
1330+ but the `internal ` type can only be generated through action `next_event `.
13311331Hence , it cannot come from an external source , so you can be certain
13321332that an `internal ` event is an event from your state machine to itself .
13331333
0 commit comments