File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -135,14 +135,13 @@ main = do
135135 return ()
136136{% endhighlight %}
137137
138- Note that we've used a ` receive ` class of function this time
139- around. These functions work with special [ ` Match ` ] [ Match ] data type,
140- allowing us do some advanced dispatching techniques. The ` match `
141- construct allows you to construct a list of potential message handlers
142- and have them evaluated against incoming messages. The first match
143- indicates that, given a tuple ` t :: (ProcessId, String) ` that we will
144- send the ` String ` component back to the sender's ` ProcessId ` . The
145- second match prints out whatever string it receives.
138+ Note that we've used a ` receive ` class of function this time around. These
139+ functions work with special [ ` Match ` ] [ Match ] data type, allowing us do some
140+ advanced dispatching techniques. The ` match ` construct allows you to construct a
141+ list of potential message handlers and have them evaluated against incoming
142+ messages. The first match indicates that, given a tuple `t :: (ProcessId,
143+ String)` that we will send the ` String` component back to the sender's
144+ ` ProcessId ` . The second match prints out whatever string it receives.
146145
147146Also note the use of a 'timeout' (given in microseconds), which is available for
148147both the ` expect ` and ` receive ` variants. This returns ` Nothing ` unless a message
You can’t perform that action at this time.
0 commit comments