[cduce-users] extraction of elements from a list

Nils Gesbert nils.gesbert at ens.fr
Thu May 18 12:12:26 CEST 2006


On Thu, 18 May 2006 11:53:09 +0200
pierluigi <luzzone at gmail.com> wrote:

> I want to get
> 
> <a name="Peter" href="address1">['something'] <a name="Axel" 
> href="address2">['somethingelse']

What do you mean exactly by this concatenation, and what do you want to do with it ? by itself, such a "concatenation" makes no sense as an expression: it would mean the first element is a function and the second is the argument.

What you want to do might be "open" a sublist which is itself an element of a bigger list ? like transforming :

[<blah>[blah blah] ... [<a name="Peter"...>[...] <a name="Axel" ...>[...]] ...]
into :
[<blah>[blah blah] ... <a name="Peter"...>[...] <a name="Axel" ...>[...] ...]
?

If this is indeed what you want to do, the ! "operator" does it, see http://www.cduce.org/manual_types_patterns.html#seq
You may also want to use flatten, which operates on a whole list of lists.



More information about the Cduce-users mailing list