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
This commit is contained in:
Ray Greenwell
2009-04-17 21:27:35 +00:00
parent 62fb546f27
commit f03caf98fe
+1 -3
View File
@@ -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