Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import flash.display.MovieClip;
- class Main extends MovieClip
- {
- public static function main()
- {
- var arr = ["john", "peter", "tom"];
- trace(Lambda.filter(arr, function (obj:String) return obj.indexOf("o")!=-1));
- trace(Lambda.filter(arr, test));
- }
- inline static function test(obj:String):Bool
- {
- return obj.indexOf("o")!=-1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment