<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: Nested Lists</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Emil, Felipe,<BR>
<BR>
Thanks. I don't know Type Families, but take the point that<BR>
the input can be parameterised with something something other<BR>
than a list. i.e. (8 :+: 4 :+: 2 :+: ()) presumably has the<BR>
same type as (4 :+: 2 :+: ()).<BR>
<BR>
My intention was to use common list functions on the sublists,<BR>
but always then a concat for each level, to return to a flat list.<BR>
With that in mind I made the following oddity, which in any case<BR>
doesn't compile due to its use of infinite types.<BR>
<BR>
app (f:fs) es = appUp (f:fs) es<BR>
<BR>
where len = genericLength (f:fs)<BR>
appUp [] es = appDown es len<BR>
appUp (f:fs) es = appUp (map map fs) (f es)<BR>
appDown es len = appDown (concat es) (len - 1)<BR>
appDown es 0 = es<BR>
<BR>
Henning,<BR>
<BR>
I agree with you, a tree would be much better for this. Thanks.<BR>
<BR>
-Paul<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>