design pattern wanted

From: Steffen Mazanek <>
Date: Tue, 08 Apr 2008 11:30:59 +0200

Hello all,

I just read the great paper about Functional
Logic Design Patterns (Antoy and Hanus, 2002).
I currently have a problem that is also of a quite
general nature and I do not yet know a solution
to this issue.

My graphs at the moment are represented
as lists of edges (basically) as follows:

--edge is pair of label and incident nodes
type Edge = (String,(Node,Node))
type Graph = [Edge]

Although all things work very nice with this
list representation (in particular, a lot of
interesting stuff works in both directions, a property
that should not be lost) it is not so nice, because
I am not interested in the order of edges here.
Further, often access is done by using the
particular label, so that a tree ordered by the
edge labels would be more appropriate. However,
sometimes I use free variables as placeholders for
edges to be instantiated later. I cannot imagine
how those could be inserted into a tree without
even knowing their label. Has somebody ever
thought or written about this issue?

How can my demands be put together to a more
appropriate data structure without losing the
advantages of the simple approach?

curry mailing list
Received on Di Apr 08 2008 - 11:47:32 CEST

This archive was generated by hypermail 2.3.0 : Do Jun 20 2024 - 07:15:09 CEST