AppleScript名:2D listをフィルターする |
— Created 2014-12-28 by Takaaki Naganoya — 2014 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set theArray to current application’s NSArray’s arrayWithArray:{{8, 2}, {7, 3}, {9, 1}, {6, 4}, {10, 10}} set thePred to current application’s NSPredicate’s predicateWithFormat:"(self[0] >5) AND (self[1] > 3)" set bArray to (theArray’s filteredArrayUsingPredicate:thePred) as list –> {8, 7, 3, 9, 1, 6} |
More from my site
(Visited 26 times, 1 visits today)