Re: [Haskell] How to implement Association-Lists and Property-Lists in Haskell

2010-05-26 Thread Philip Weaver
I'm sorry, I responded a little too fast (and it's the middle of the night, ugh). Roots, Octs, and Modes aren't the same types (String vs. Integer), so my second suggestion is broken. On Wed, May 26, 2010 at 3:15 AM, Philip Weaver wrote: > Hello! You have several options. First, consider that

Re: [Haskell] How to implement Association-Lists and Property-Lists in Haskell

2010-05-26 Thread Philip Weaver
Hello! You have several options. First, consider that when you lookup (see Prelude.find) a field in the alist, you're going to stop as soon as you find the first match. So, as long as you're appending new fields to the front of list, then you'll be ok (it will be correct, but not efficient). If

[Haskell] How to implement Association-Lists and Property-Lists in Haskell

2010-05-26 Thread Tom Jordan
Greetings, I'm struggling to find a way to define an "Alist" once, and then simply add-in "Fields" to it incrementally.. without having to keep using new identifiers/variables to hold the result of each "addin" expression. I understand that pure Functional Programming doesn't use destructive state