]> gitweb.factorcode.org Git - factor.git/commitdiff
"<$" made generic + moved to monads
authorSam Anklesaria <sam@Tintin.local>
Sat, 27 Jun 2009 18:31:22 +0000 (13:31 -0500)
committerSam Anklesaria <sam@Tintin.local>
Sat, 27 Jun 2009 18:57:29 +0000 (13:57 -0500)
extra/monads/monads.factor
extra/ui/frp/functors/functors-docs.factor
extra/ui/frp/layout/layout.factor
extra/ui/frp/signals/signals-docs.factor
extra/ui/frp/signals/signals.factor

index f4503cbdd3f1f1f552f91f3a96002d95332de64f..9a3e605c7fc4926f5b5f90fd1fd4af6259208529 100644 (file)
@@ -7,6 +7,7 @@ IN: monads
 
 ! Functors
 GENERIC# fmap 1 ( functor quot -- functor' )
+GENERIC# <$ 1 ( functor quot -- functor' )
 
 ! Monads
 
index e6c5c0f8d59d4822526af5d9b83520b278cf9ad0..256be95702f44d911ca61d243fa381132312137d 100644 (file)
@@ -1,4 +1,4 @@
-USING: help.markup help.syntax ui.frp.signals ui.frp.signals.private ;
+USING: help.markup help.syntax ui.frp.signals ;
 IN: ui.frp.functors
 
 ARTICLE: { "ui.frp.functors" "signal-collection" } "Signal Collection"
index bee0adec9342d676874338c383838134beb13b1a..bea2700dc23a225df168beb5a9c55abfcc945000 100644 (file)
@@ -1,7 +1,7 @@
 USING: accessors arrays fry kernel lexer make math.parser
 models monads namespaces parser sequences
 sequences.extras ui.frp.gadgets ui.frp.signals ui.gadgets
-ui.gadgets.books ui.gadgets.tracks words ui.tools.inspector ;
+ui.gadgets.books ui.gadgets.tracks words ;
 QUALIFIED: make
 IN: ui.frp.layout
 
@@ -62,7 +62,7 @@ GENERIC# (insert-item) 1 ( item location -- )
 M: gadget (insert-item) dup parent>> track? [ [ f <layout> ] dip (insert-item) ]
     [ insertion-point [ add-gadget ] keep insert-gadget ] if ;
 M: layout (insert-item) insertion-point [ add-layout ] keep [ gadget>> insert-gadget ] [ size>> insert-size ] 3bi ;
-M: model (insert-item) dup inspector parent>> dup book? [ "No models in books" throw ]
+M: model (insert-item) parent>> dup book? [ "No models in books" throw ]
    [ dup model>> dup |? [ nip swap add-connection ] [ drop [ 1array <|> ] dip (>>model) ] if ] if ;
 : insert-item ( item location -- ) [ dup get [ drop ] [ remove-members ] if ] [ on ] [ ] tri
     [ add-member ] 2keep (insert-item) ;
index e542424c2abae3a902a8d6d800590e95e333042b..1996213ee2bbba45b3b48f1dc839b6388946a089 100644 (file)
@@ -1,4 +1,4 @@
-USING: help.markup help.syntax models models.arrow sequences ui.frp.signals ;
+USING: help.markup help.syntax models models.arrow sequences ui.frp.signals monads ;
 IN: ui.frp.signals
 
 HELP: <merge>
index 36a8b565a17aa40b0d6a39de4466ad8acaa6976d..dcb4d3e315c90da99e77328345966ed58123c26b 100644 (file)
@@ -78,7 +78,7 @@ M: side-effect-model (model-changed) [ value>> ] dip [ quot>> call( old -- ) ] 2
 
 TUPLE: quot-model < mapped-model ;
 M: quot-model (model-changed) nip [ quot>> call( -- b ) ] keep set-model ;
-: <$ ( model quot -- signal ) quot-model new-mapped-model ;
+M: model <$ quot-model new-mapped-model ;
 
 TUPLE: action-value < basic-model parent ;
 : <action-value> ( parent value -- model ) action-value new-model swap >>parent ;