Skip to content

Instantly share code, notes, and snippets.

@Palleas
Forked from ludofleury/gist:1319804
Created October 27, 2011 15:03

Revisions

  1. Palleas revised this gist Oct 27, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.as
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ var foo:Function = function(remove:String) : Function {
    };
    }

    var trueMan : String = foo('water');
    var trueMan : Function = foo('water');

    var liquor : Array = ['water','whisky', 'beer'];

  2. Palleas revised this gist Oct 27, 2011. 1 changed file with 6 additions and 7 deletions.
    13 changes: 6 additions & 7 deletions gistfile1.as
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,12 @@
    var foo:Function = function(remove:String) {
    var remove:String = remove;
    return function (item:*, index:int, array:Array):Boolean {
    return (item != remove);

    var foo:Function = function(remove:String) : Function {
    var remove : String = remove;
    return function (item:*, index:int, array:Array) : Boolean {
    return (item != remove);
    };
    }

    var trueMan = foo('water');
    var trueMan : String = foo('water');

    var liquor:Array = new Array('water','whisky', 'beer');
    var liquor : Array = ['water','whisky', 'beer'];

    liquor.filter(trueMan);
  3. @ludofleury ludofleury created this gist Oct 27, 2011.
    13 changes: 13 additions & 0 deletions gistfile1.as
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    var foo:Function = function(remove:String) {
    var remove:String = remove;
    return function (item:*, index:int, array:Array):Boolean {
    return (item != remove);

    };
    }

    var trueMan = foo('water');

    var liquor:Array = new Array('water','whisky', 'beer');

    liquor.filter(trueMan);