Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Exercises part 1

In these exercises, you are supposed to implement a bunch of utility functions for consuming and converting strings. I don't give the expected types here, because you are supposed to come up with those yourself.

  1. Implement functions similar to map, filter, and mapMaybe for strings. The output type of these should always be a string.

  2. Implement functions similar to foldl and foldMap for strings.

  3. Implement a function similar to traverse for strings. The output type should be a wrapped string.

  4. Implement the bind operator for strings. The output type should again be a string.