We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e077ba5 commit b4a1f17Copy full SHA for b4a1f17
docs/source/intro.rst
@@ -76,8 +76,10 @@ based on the intent.
76
77
def main():
78
eff = greet()
79
- dispatcher = TypeDispatcher({ReadLine: perform_read_line})
80
- perform(dispatcher, effect)
+ dispatcher = ComposedDispatcher([
+ TypeDispatcher({ReadLine: perform_read_line}),
81
+ base_dispatcher])
82
+ perform(dispatcher, eff)
83
84
This has a number of advantages. First, your unit tests for ``get_user_name``
85
become simpler. You don't need to mock out or parameterize the ``raw_input``
0 commit comments