From 2a3db4cd23bec207cd404a8b3ed1bdeedbcea2e5 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 9 Dec 2008 21:50:31 -0600 Subject: [PATCH] Minor optimization to flip --- core/sequences/sequences.factor | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor index 8c9eff94f5..e364359928 100644 --- a/core/sequences/sequences.factor +++ b/core/sequences/sequences.factor @@ -845,9 +845,10 @@ PRIVATE> USE: arrays : array-length ( array -- len ) - { array } declare length>> ; + { array } declare length>> ; inline : array-flip ( matrix -- newmatrix ) + { array } declare [ dup first array-length [ array-length min ] reduce ] keep [ [ array-nth ] with { } map-as ] curry { } map-as ;