Created
May 1, 2015 05:19
-
-
Save tristaaan/ccf818d0cf8aa077e516 to your computer and use it in GitHub Desktop.
Revisions
-
tristaaan created this gist
May 1, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ extension Array{ func every(fn: (T)->Bool) -> Bool{ var out = true for i in self { out = out && fn(i); } return out } func some(fn: (T) -> Bool) -> Bool{ var out = false for i in self { out = out || fn(i); } return out } }