Getting 'a' value from 'Maybe a' return type in Haskell
This is going to be hard to explain because there is a decent amount of background detail about the code as a whole that needs to be known to really know functionally what I'm talking about. But I'll try my best to just get my main point across, and hope that it's enough. Let me know if not and I'll add more information. So: I have a Haskell function eval :: WExp -> Memory -> WValue with a bunch of different instances of itself for different cases. For now, knowledge about WExp , Memory , and WValue is not relevant. My problem is that, for a specific instance of eval , I am using a lookup