3 ms·
This seems interesting. Maybe I can use something similar next year to generate some interest. Without IO (which is monads, which is too advances since we also
by maweki 9y ago
This seems interesting. Maybe I can use something similar next year to generate some interest. Without IO (which is monads, which is too advances since we also do functional C# and functional java paradigms in the same course) the subject matter is always a bit dry since the students have nothing but the ghci repl to get any interaction or feedback going.
- def- 9y agoThe most fun exercise for me was generating music in Haskell, but it was quite challenging and I remember not many students tried it.
- wyager 9y agoWhat if you were to give students some functions like imShow :: [[Int]] -> IO () playSound [Int] -> IO () ? This would give them a little more liveliness but wouldn't require them to understand anything beyond "IO () is something that the repl can run". If they're feeling exploratory, maybe give them a few monadic combinators like >> to play around with, possibly specialized to IO.
- WorldMaker 9y agoYou could also build a "sandbox" monad specifically for the class/framework. Let the students treat the monad as a blackbox Turing machine/state machine, unless they get time/interest/show aptitude to dive deeper. Doing that gives you the benefit that they don't accidentally google "Haskell IO" and fall down the monad rabbit hole without some preparation.
- mrkgnao 9y agohttps://code.world/ https://code.world/