20. HC20 ‐ Haskell Chapter 20 Practical Tasks: Monad - wimsio/universities GitHub Wiki

  1. HC20T1: Create a function safeDivide that performs safe division using the Maybe monad.
  2. HC20T2: Implement a function sequenceMaybe that converts a list of Maybe values into a Maybe of list.
  3. HC20T3: Create a logging calculator using the Writer monad to keep track of all operations.
  4. HC20T4: Implement a function countChars that counts occurrences of a character in a string using the State monad.
  5. HC20T5: Use the Reader monad to create a configuration-based system for greeting users.
  6. HC20T6: Implement a function doubleMonad that combines two monads: Maybe and List.
  7. HC20T7: Create a function findFirst that uses the Either monad to handle errors when finding an element in a list.
  8. HC20T8: Build a parser that parses simple expressions using the Parser monad.
  9. HC20T9: Implement a function replicateMonad that replicates a value using the Identity monad.
  10. HC20T10: Implement a nested monad transformer that combines StateT and MaybeT.
  11. HC20T11: Write a function randomWalk using the State monad that simulates a random walk on a 2D grid.
  12. HC20T12: Use the IO monad to read a file and display its contents line-by-line.
  13. HC20T13: Create a function fibonacciMemo using the State monad to memoize Fibonacci calculations.
  14. HC20T14: Implement a monadic function mapMFilter that maps and filters elements using a monad.
  15. HC20T15: Write a function treeSum that computes the sum of elements in a binary tree using a custom monad.
  16. HC20T16: Define a function retryIO that retries an IO operation up to a specified number of attempts using the IO monad.
  17. HC20T17: Implement a function validatePassword that performs multiple checks using the Either monad to return validation errors.
  18. HC20T18: Create a MaybeT monad transformer to combine Maybe and IO for user input validation.
  19. HC20T19: Implement a Writer monad-based logging system that tracks function calls and their arguments.
  20. HC20T20: Write a function batchProcessing that chains multiple monadic actions together using >>= (bind).

Finished. Congratulations! Get your progress token here