<p>Finally, we call our <span class="fixed">action</span> function with the rest of the argument list. That will return an I/O action that either adds an item, displays a list of items or deletes an item and because that action is part of the <span class="fixed">main</span> <i>do</i> block, it will get performed. If we follow our concrete example so far and our <span class="fixed">action</span> function is <span class="fixed">add</span>, it will get called with <span class="fixed">args</span> (so <span class="fixed">["todo.txt", "Spank the monkey"]</span>) and return an I/O action that adds <span class="fixed">Spank the monkey</span> to <i>todo.txt</i>.</p>
0 commit comments