From 9d813ef1a9f048b0024e9c3b09214a4c87acc238 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 26 Sep 2012 15:43:15 -0700 Subject: [PATCH] math.extras: simpler herfindahl. --- extra/math/extras/extras.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/math/extras/extras.factor b/extra/math/extras/extras.factor index d011ce80a6..84e0ed06d8 100644 --- a/extra/math/extras/extras.factor +++ b/extra/math/extras/extras.factor @@ -180,7 +180,7 @@ PRIVATE> ] if ; : herfindahl ( seq -- x ) - dup sum sq '[ sq _ / ] map-sum ; + [ sum-of-squares ] [ sum sq ] bi / ; : normalized-herfindahl ( seq -- x ) [ herfindahl ] [ length recip ] bi