So, go for it!
Christian
"Luis Quesada" <luque@info.ucl.ac.be> wrote in message
news:<3D00862E.BF312752@info.ucl.ac.be>...
> Luis Quesada wrote:
>
> > BTW, FdDistribute is very inefficient too (because of the same
> > reason-- you traverse Xs to apply the filter and then you traverse
> > the resulting list to choose the element.).
> >
> > proc {FdDistribute RawSpec Vec}
> >
> > ...
> > case {Filter Xs Fil} of nil then skip elseof
Xs=X|Xr then
> > V={Select {Choose Xr X Order}}
> > D={SelVal V}
> >
> > ...
> > {Do {VectorToList Vec}}
> > end
> > end
> > end
> >
> > I think that using the 'Choose' I am suggesting can help in this
> > case too.
> >
>
> Assuming that new list is calculated while choosing the element:
>
>
> fun {Choose V Order Filter}
> NewOrder=fun{$ E1 E2}
> if E2==unit then true else {Order E1 E2} end
> end
> Max={NewCell unit}
> Fs={NewCell nil}
> P=if {IsList V} then List.forAll else Record.forAll end
> in
> {P V proc {$ E}
> if {Filter E} then Old in
> {Exchange Fs Old E|Old}
> if {NewOrder E {Access Max}} then {Assign Max E} end
> end
> end}
> {Access Max}#{Access Fs}
> end
>
> Luis
>
> --
> Catholic University of Louvain
> Department of Computing Science and Engineering
> Place Sainte Barbe, 2
> B-1348 Louvain-la-Neuve, Belgium
> Phone: (++32) (10) 47 90 13
> Fax: (++32) (10) 45 03 45
> Web: http://www.info.ucl.ac.be/~luque
>
>
>
> -
> Please send submissions to hackers@mozart-oz.org
> and administriva mail to hackers-request@mozart-oz.org.
> The Mozart Oz web site is at http://www.mozart-oz.org/.
-
Please send submissions to hackers@mozart-oz.org
and administriva mail to hackers-request@mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.