[Haskell-cafe] Re: Non Empty List?
Günther Schmidt
gue.schmidt at web.de
Thu Jun 4 20:08:01 EDT 2009
Hi Tony,
that's because I wasn't sure whether or not it would be applicable here.
As with monads, continuations, delimited continuations and quite a
number of other high level concepts I only understand them in part even
though I realize at the same time that understanding them fully would
yield enormous benefits. I am aware of the power of these concepts, but
have not gained the intuition yet.
As for the zipper: In some of the examples I've seen, the zipper is
implemented "on top" of an underlying data structure, but not the data
structure itself.
In my app I was actually going to pull a zipper over it, once I had the
underlying structure right.
Günther
PS: please also see my reply to Tillman
Tony Morris schrieb:
> I note that you didn't address the suggestion of a zipper.
>
>
> Günther Schmidt wrote:
>> Dan Weston schrieb:
>>> Unless I'm missing something in your description, why not
>>>
>>> data Container a = Single a | Many a a [a]
>>>
>> Hi Dan,
>>
>> the above solution would still allow to construct, for instance,
>>
>> Many 5 42 [] :: Container Int
>>
>> The reason why I'm trying to find the design for a data structure in
>> which this would not even be possible is to be able to avoid writing
>> additional "bookkeeping" code into the functions that operate on the
>> structure, ie. the lookups, inserts, delete etc.
>>
>> Günther
>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>
More information about the Haskell-Cafe
mailing list