From f03caf98fefc6c5de64c9ff3f19961a5920d69ba Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Fri, 17 Apr 2009 21:27:35 +0000 Subject: [PATCH] Use Util.adapt(). Look at this functional programming masterpiece. I'm not sure how much actual utility is here, and how much I just like the gee-whiz factor. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5731 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/util/SortedHashMap.as | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/as/com/threerings/util/SortedHashMap.as b/src/as/com/threerings/util/SortedHashMap.as index df8746706..2382bb58c 100644 --- a/src/as/com/threerings/util/SortedHashMap.as +++ b/src/as/com/threerings/util/SortedHashMap.as @@ -70,9 +70,7 @@ public class SortedHashMap extends HashMap override public function values () :Array { // not very optimal, we need to look up each value from the sorted keys. - return keys().map(function (key :Object, ... rest) :Object { - return get(key); - }); + return keys().map(Util.adapt(get)); } override public function forEach (fn :Function) :void