Hi,
attached is a patch that cleans up sequences.product a bit. Feel free
to merge it if you want.

By the way, is this a good way of sending patches ? It's easier for
the sender since you don't have to have a git repo availlable to pull
from (github or anything).

Jon
From dbc2f33cda0e3a8b89cda6c51aee4a110c4d7332 Mon Sep 17 00:00:00 2001
From: Jon Harper <jon.harpe...@gmail.com>
Date: Tue, 19 Oct 2010 18:03:05 +0200
Subject: [PATCH] cleanup

---
 basis/sequences/product/product.factor |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/basis/sequences/product/product.factor b/basis/sequences/product/product.factor
index 4290085..487d7b2 100644
--- a/basis/sequences/product/product.factor
+++ b/basis/sequences/product/product.factor
@@ -14,7 +14,7 @@ M: product-sequence length lengths>> product ;
 <PRIVATE
 
 : ns ( n lengths -- ns )
-    [ V{ } clone ] 2dip [ /mod swap [ over push ] dip ] each drop ;
+    [ /mod ] map nip ;
 
 : nths ( ns seqs -- nths )
     [ nth ] { } 2map-as ;
@@ -38,10 +38,10 @@ M: product-sequence length lengths>> product ;
     [ 0 over [ 1 + ] change-nth ] dip carry-ns ;
 
 : start-product-iter ( sequences -- ns lengths )
-    [ [ drop 0 ] map ] [ [ length ] map ] bi ;
+    [ length 0 <array> ] [ [ length ] map ] bi ;
 
 : end-product-iter? ( ns lengths -- ? )
-    [ 1 tail* first ] bi@ = ;
+    [ last ] bi@ = ;
 
 PRIVATE>
 
-- 
1.7.0.4

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to