Effective Haskell Chapter 8 (second version of handleArgs)

In Chapter 8, the second version of handleArgs (p. 347 in my ePub version) the non-error pattern match in the case statement is (arg:args) -> Right args. It should return arg, the head of the non-empty list. This is repeated in the following code listing (which replaces the placeholder definition with parseArgs <$> Env.getArgs).

1 Like