Exercises part 1

August 9, 2025 ยท View on GitHub

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.