diff demo/more/grid.ur @ 1172:ad15700272f6

Changing foldRX to mapX
author Adam Chlipala <adamc@hcoop.net>
date Sun, 28 Feb 2010 13:06:10 -0500
parents 8d3aa6c7cee0
children f0afe61a6f8b
line wrap: on
line diff
--- a/demo/more/grid.ur	Sat Feb 27 16:49:11 2010 -0500
+++ b/demo/more/grid.ur	Sun Feb 28 13:06:10 2010 -0500
@@ -123,7 +123,7 @@
       <table class={tabl}>
         <tr class={tr}>
           <th/> <th/> <th><button value="No sort" onclick={set grid.Sort None}/></th>
-          {@foldRX2 [fst3] [colMeta M.row] [_]
+          {@mapX2 [fst3] [colMeta M.row] [_]
             (fn [nm :: Name] [p :: (Type * Type * Type)] [rest :: {(Type * Type * Type)}] [[nm] ~ rest]
                              data (meta : colMeta M.row p) =>
                 <xml><th class={th}>
@@ -208,7 +208,7 @@
                                 </td>
 
                                 <dyn signal={cols <- signal colsS;
-                                             return (@foldRX3 [fst3] [colMeta M.row] [snd3] [_]
+                                             return (@mapX3 [fst3] [colMeta M.row] [snd3] [_]
                                                       (fn [nm :: Name] [t :: (Type * Type * Type)]
                                                                        [rest :: {(Type * Type * Type)}]
                                                                        [[nm] ~ rest] data meta v =>
@@ -260,14 +260,14 @@
                                   M.aggFolder M.aggregates) grid.Rows;
                          return <xml><tr>
                            <th colspan={3}>Aggregates</th>
-                           {@foldRX2 [aggregateMeta M.row] [id] [_]
+                           {@mapX2 [aggregateMeta M.row] [id] [_]
                              (fn [nm :: Name] [t :: Type] [rest :: {Type}] [[nm] ~ rest] meta acc =>
                                  <xml><td class={agg}>{meta.Display acc}</td></xml>)
                              M.aggFolder M.aggregates rows}
                          </tr></xml>}/>
 
               <tr><th colspan={3}>Filters</th>
-                {@foldRX3 [colMeta M.row] [fst3] [thd3] [_]
+                {@mapX3 [colMeta M.row] [fst3] [thd3] [_]
                   (fn [nm :: Name] [p :: (Type * Type * Type)] [rest :: {(Type * Type * Type)}] [[nm] ~ rest]
                                    meta state filter => <xml><td>{(meta.Handlers state).DisplayFilter filter}</td></xml>)
                   M.folder M.cols grid.Cols grid.Filters}