Skip to content

Instantly share code, notes, and snippets.

@Palleas
Forked from ludofleury/gist:1319804
Created October 27, 2011 15:03
Show Gist options
  • Save Palleas/1319807 to your computer and use it in GitHub Desktop.
Save Palleas/1319807 to your computer and use it in GitHub Desktop.
var foo:Function = function(remove:String) : Function {
var remove : String = remove;
return function (item:*, index:int, array:Array) : Boolean {
return (item != remove);
};
}
var trueMan : Function = foo('water');
var liquor : Array = ['water','whisky', 'beer'];
liquor.filter(trueMan);
@ludofleury
Copy link

oook, sympa la notation.
Par contre, je ne pige pas : var trueMan : String = foo('water'); ? String ?

@Palleas
Copy link
Author

Palleas commented Oct 27, 2011

Je ne vois pas de quoi tu parles.

@ludofleury
Copy link

C'est trop magique l'AS3... j'arrête. ;) Merci.

@Palleas
Copy link
Author

Palleas commented Oct 28, 2011

Magique? Ça marcherait pareil en Javascript :o

@neovov
Copy link

neovov commented Oct 30, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment