title: mapping multiple functions in haskell
body: <p>I'm working on a way of representing memory in Haskell that looks like this...</p>
  
  <pre><code>data MemVal = Stored Value | Unbound
            deriving Show
  
  type Memory = ([Ide],Ide -&gt; MemVal)
  </code></pre>
  
  <p>As an Identifier is called its added to the list of Identifiers. If an error occurs in the program I want to be able to recall the identifiers used up to date. So far I have this...</p>
  
  <pre><code>display :: Memory -&gt; String
  display m = "Memory = " ++ show (map (snd m) (fst m)) ++ " "
  </code></pre>
  
  <p>But was wondering if there were a way to map the name of the identifier to (fst m) as well as the function (snd m) so the output will be similar to...</p>
  
  <pre><code>Memory = [sum = stored Numeric 1, x = stored Boolean true]
  </code></pre>
  
  <p>Thank you.</p>