help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: filter and filter-out functions do they preserve order


From: Nicholas Mc Guire
Subject: Re: filter and filter-out functions do they preserve order
Date: Fri, 14 Aug 2009 19:01:53 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Fri, 14 Aug 2009, Krzysztof Cieniuch wrote:

> Hi,
>
> Short question as in subject does filter function preserves original  
> elements order
> I did some tests like:
> org:= a b c d e
> res:=$(filter a d c,$(org))
> $(info $(res))
>
> and this prints  a c d so it looks like it preserves order but can I  
> relay on that
> or is this just coincidence in my simple example ?
>
If you need to rely on order then simply use sort to ensure lexical 
order - then you don't need to bother with possible implementation 
details (the info page does not say anything about preserving order)

hofrat




reply via email to

[Prev in Thread] Current Thread [Next in Thread]