-
-
Save Palleas/1319807 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
Je ne vois pas de quoi tu parles.
C'est trop magique l'AS3... j'arrête. ;) Merci.
Magique? Ça marcherait pareil en Javascript :o
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
oook, sympa la notation.
Par contre, je ne pige pas : var trueMan : String = foo('water'); ? String ?