Lambda filter() examples

var names = ["ted", "frank", "tim", "jack"];

var tnames = Lambda.filter( names, function (s) { 
                                        return s.charAt(0) == "t"; });
       
trace(tnames); // {ted, tim}
       
// It's important to note that filter returns a new list, 
// not an array with the filtered elements.
// The names array is not altered through this operation
version #8027, modified 2010-02-05 13:33:16 by hhoelzer
0 comment