
7 Aug
2011
7 Aug
'11
4:27 p.m.
On Aug 7, 2011, at 3:55 PM, Manfred Lotz wrote:
import Data.Map (Map, (!), lookup)
lookup ConfigAppDir myDirs myDirs ! ConfigAppDir
This is the solution I like. I have to accept that here I cannot reach the conciseness of which might be due to Haskell being strongly typed.
In your original note, you mentioned that you have a small number of entries in your list of directories. If so, you might find that association lists work just fine for you without needing to import Data.Map.
http://hackage.haskell.org/packages/archive/base/latest/doc/html/Prelude.htm...