Doing something along the lines of:

        const a = array ( filter! ... ) ;
        foreach ( i ; a ) { ... }

works fine.  Question 1 though is why I can't use immutable here, why I
have to use const.  Question 2 is why I can't do:

        const a = filter! ... ;
        foreach ( i ; a ) { ... }

if I try this I get messages along the lines of:

./signatures_sequential.d(33): Error: function 
signatures_sequential.main.filter!(delegate @system bool(string item)
{
return isDir(cast(const(char[]))item);
}
).filter!(const(immutable(char)[])[]).filter.Result.empty () is not callable 
using argument types ()
./signatures_sequential.d(33): Error: function 
signatures_sequential.main.filter!(delegate @system bool(string item)
{
return isDir(cast(const(char[]))item);
}
).filter!(const(immutable(char)[])[]).filter.Result.popFront () is not callable 
using argument types ()
./signatures_sequential.d(33): Error: function 
signatures_sequential.main.filter!(delegate @system bool(string item)
{
return isDir(cast(const(char[]))item);
}
).filter!(const(immutable(char)[])[]).filter.Result.front () is not callable 
using argument types ()

which, it has to be said, isn't exactly informative to the user.

Thanks.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[email protected]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [email protected]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to