Hi everyone,
what do you think about removing the "model" slot from arrow models?
It looks redundant with the dependencies slot to me.
You can take a look at the attached patch that removes it (unit-tests
pass with this patch)
Jon
From 75a9483dc8df5f24ee94118349cf303531354375 Mon Sep 17 00:00:00 2001
From: Jon Harper <[email protected]>
Date: Sun, 14 Nov 2010 17:20:19 +0100
Subject: [PATCH] Remove unecessary slot from arrow models
---
basis/models/arrow/arrow.factor | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/basis/models/arrow/arrow.factor b/basis/models/arrow/arrow.factor
index e0cf73c..1710799 100644
--- a/basis/models/arrow/arrow.factor
+++ b/basis/models/arrow/arrow.factor
@@ -1,18 +1,17 @@
! Copyright (C) 2008, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors models kernel ;
+USING: accessors models kernel sequences ;
IN: models.arrow
-TUPLE: arrow < model model quot ;
+TUPLE: arrow < model quot ;
: <arrow> ( model quot -- arrow )
f arrow new-model
swap >>quot
- over >>model
[ add-dependency ] keep ;
M: arrow model-changed
[ [ value>> ] [ quot>> ] bi* call( old -- new ) ] [ nip ] 2bi
set-model ;
-M: arrow model-activated [ model>> ] keep model-changed ;
+M: arrow model-activated [ dependencies>> ] keep [ model-changed ] curry each ;
--
1.7.0.4
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk