GOOF----LE-8-2.0Û%]-4hˆ] gguile¤ ¤ gdefine-module*¤ ¤ ¤ gsxml¤ gfold¤ ¤ gfilenameS¤ f sxml/fold.scm¤ gimportsS¤ gsrfi¤ gsrfi-1¤   ¤ ¤ ¤ gexportsS¤ gfoldt¤ gfoldts¤ gfoldts*¤ g fold-values¤ gfoldts*-values¤ g fold-layout¤ ¤ gset-current-module¤ ¤ ¤ gatom?¤ gmap¤ gapply¤ gappend¤ gassq¤ !gassq-ref¤ "gerror¤ #fno binding available¤ $g@¤ %gmacro¤ &gpre¤ 'greverse¤ (gbindings¤ )g pre-layout¤ *gpost¤ +g *default*¤ ,g*text*¤C5hp"‘]4   54>"Ghq]ˆ€Cigx  gfilenamef sxml/fold.scmŒ & ŒŒ  ' ŒŒ  ' ŒŒ   gnamegatom?ŒCRhZ]LL6Rgkid  gfilenamef sxml/fold.scmŒ 0 ŒŒ 1 ŒŒ  Ch(0]45$64O56(gfup  'gfhere  'gtree   'gfilenamef sxml/fold.scmŒ ) ŒŒ  . ŒŒ . ŒŒ  / ŒŒ  0 ŒŒ ' 0 ŒŒ  ' gnamegfoldtŒg documentationfjThe standard multithreaded tree fold. @var{fup} is of type [a] -> a. @var{fhere} is of type object -> a. ŒCRhm]LLL6egkid  gkseed  gfilenamef sxml/fold.scmŒ : ŒŒ  ; ŒŒ   Ch8j]45$64O4556bgfdown  8gfup  8gfhere   8gseed   8gtree   8gfilenamef sxml/fold.scmŒ 4 ŒŒ  7 ŒŒ 7 ŒŒ  8 ŒŒ  : ŒŒ ( < ŒŒ 4 : ŒŒ 8 9 ŒŒ  8 gnamegfoldtsŒg documentationfnThe single-threaded tree fold originally defined in SSAX. @xref{sxml ssax,,(sxml ssax)}, for more information.ŒCRhm]LLL6egkid  gkseed  gfilenamef sxml/fold.scmŒ J ŒŒ  K ŒŒ   ChHÔ]45$64> G4O56Ìgfdown  Egfup  Egfhere   Egseed   Egtree   Egkseed  " Egtree  " Egfilenamef sxml/fold.scmŒ @ ŒŒ  D ŒŒ D ŒŒ  E ŒŒ  G ŒŒ % F ŒŒ . J ŒŒ E I ŒŒ  E gnamegfoldts*Œg documentationf²A variant of @ref{sxml fold foldts,,foldts} that allows pre-order tree rewrites. Originally defined in Andy Wingo's 2007 paper, @emph{Applications of fold to XML transformation}.ŒCRh8Ž-13(E4> GŽ@†gproc 3glist 3gseeds  3gseeds  # 3gfilenamef sxml/fold.scmŒ Q ŒŒ  U ŒŒ  V ŒŒ  X ŒŒ  X !ŒŒ " X ŒŒ & W ŒŒ / Z "ŒŒ 3 Z ŒŒ 3  gnameg fold-valuesŒg documentationf“A variant of @ref{SRFI-1 Fold and Map, fold} that allows multi-valued seeds. Note that the order of the arguments differs from that of @code{fold}.ŒCRho-13LLL@ggtree gseeds gfilenamef sxml/fold.scmŒ h ŒŒ  i ŒŒ  Ch`-1345$@4> G4O> G45@ùgfdown `gfup `gfhere  `gtree  `gseeds  `gtree  + `gkseeds  + `gkseeds  L `gfilenamef sxml/fold.scmŒ \ ŒŒ ` ŒŒ  ` ŒŒ  a ŒŒ  c ŒŒ . b ŒŒ 3 g ŒŒ O e ŒŒ V m ŒŒ ` m ŒŒ `  gnamegfoldts*-valuesŒg documentationf¯A variant of @ref{sxml fold foldts*,,foldts*} that allows multi-valued seeds. Originally defined in Andy Wingo's 2007 paper, @emph{Applications of fold to XML transformation}.ŒCR h ­] 45$ŽCC¥galist  gkey  gdefault   gt  gfilenamef sxml/fold.scmŒ o ŒŒ  p ŒŒ p ŒŒ   gnamegassq-refŒC!R"#hx-136pgargs gfilenamef sxml/fold.scmŒ ¹ ŒŒ º ŒŒ  º ŒŒ  gnamegerrŒCh‚-13LL@zgargs gfilenamef sxml/fold.scmŒ ½ ŒŒ  ¾ )ŒŒ  ¾ ŒŒ  gnameg cont-with-tagŒC!$%&'h¦]45Džgparams  glayout  g old-layout   gkids   gfilenamef sxml/fold.scmŒ Õ ŒŒ  Ö ŒŒ Ö ŒŒ  C()h{]Csgtag  gparams  glayout   gfilenamef sxml/fold.scmŒ Ü ŒŒ   C*+ h`b]>"›O Q $ 45"4L5  Ž(   ŒD"Ž   ŒDŽˆ$/Ž& 4ŽŽ 5Œ ŽŽ   D"ÿÿ·"ÿÿ³45$“45$!4?"ÿÿ45$4?D4544  554 4 L55"ÿþ¿4 L5"ÿþ§Zgtree  _gbindings  _gpcont   _gparams   _glayout   _gret   _g new-bindings   ¡g new-layout   ¡gcont   ¡g cont-with-tag  ¡gbindings 6 ¡g style-params 6 ¡gparams ˆ ™g tag-bindings  ¬ _gt  ¾ Ggt  ñ Ggfilenamef sxml/fold.scmŒ » ŒŒ  ¼ ŒŒ  ½ ŒŒ  ¿ ŒŒ  À ŒŒ ,  ŒŒ 3  /ŒŒ 4  :ŒŒ 6  ŒŒ 6 ½ ŒŒ = Ä ŒŒ A à ŒŒ B Æ ŒŒ K Æ &ŒŒ N Æ LŒŒ P Å ŒŒ W Í ŒŒ ` Í -ŒŒ c Í SŒŒ e Ì ŒŒ e à ŒŒ h Ç ŒŒ j Ç ŒŒ n à ŒŒ q Ç (ŒŒ u Ç 5ŒŒ y Ç ŒŒ z È ŒŒ  È &ŒŒ … È ŒŒ ˆ È ŒŒ ˆ È ŒŒ Ê ŒŒ — Ê BŒŒ ™ É ŒŒ ¢ á ŒŒ © á +ŒŒ ¬ á ŒŒ ¬ á ŒŒ ´ â ŒŒ µ ä ŒŒ » ä ŒŒ ¾ ä ŒŒ ¾ â ŒŒ Ç Ñ ŒŒ ç Ñ ŒŒ è å ŒŒ î å ŒŒ ñ å ŒŒ ñ â ŒŒ ú Ô ŒŒ  × ŒŒ  Ô ŒŒ  Ú ŒŒ  Ú ŒŒ  Ú ŒŒ  Û ŒŒ  Û ŒŒ  Û ŒŒ ! Û ŒŒ ) Û ŒŒ * ß ŒŒ 0 ß ŒŒ 1 à ŒŒ 7 à $ŒŒ ; à ŒŒ = ß ŒŒ G Ù ŒŒ K Ï ŒŒ Q Ï 1ŒŒ U Ï ŒŒ _ Ï ŒŒI  _ gnamegfdownŒC'h8ˆ, 3 4 4 5> G    ŒD€gtree  2gbindings  2gcont   2gparams   2glayout   2gret   2g kbindings   2gkcont   2gkparams   2gklayout  2gkret  2gklayout  2gkret  2 gfilenamef sxml/fold.scmŒ ç ŒŒ  ë ŒŒ  ë (ŒŒ  ë ŒŒ  é ŒŒ 0 í -ŒŒ 2 í ŒŒ  2 gnamegfupŒC!,h06]44L5> GŒD.gtree  0gbindings  0gcont   0gparams   0glayout   0gret   0gtlayout   0gtret   0gfilenamef sxml/fold.scmŒ î ŒŒ  ñ ŒŒ  ñ ŒŒ ñ ŒŒ  ñ ŒŒ  ñ ŒŒ  ï ŒŒ . ó -ŒŒ 0 ó ŒŒ  0 gnamegfhereŒChP£]=OQ4O>  G     D›gtree  Ngbindings  Ngparams   Nglayout   Ng stylesheet   Ngerr   Ngfdown   Ngbindings  : Ngcont  : Ngparams : Nglayout : Ngret : N gfilenamef sxml/fold.scmŒ s ŒŒ  ö ŒŒ 1 ÷ 7ŒŒ 4 ÷ CŒŒ 9 ö ŒŒ = ô ŒŒ J ù ŒŒ N ù ŒŒ  N gnameg fold-layoutŒg documentationf A traversal combinator in the spirit of SSAX's @ref{sxml transform pre-post-order,,pre-post-order}. @code{fold-layout} was originally presented in Andy Wingo's 2007 paper, @emph{Applications of fold to XML transformation}. @example bindings := (...) binding := ( ...) | (*default* . ) | (*text* . ) tag := handler-pair := (pre-layout . ) | (post . ) | (bindings . ) | (pre . ) | (macro . ) @end example @table @var @item pre-layout-handler A function of three arguments: @table @var @item kids the kids of the current node, before traversal @item params the params of the current node @item layout the layout coming into this node @end table @var{pre-layout-handler} is expected to use this information to return a layout to pass to the kids. The default implementation returns the layout given in the arguments. @item post-handler A function of five arguments: @table @var @item tag the current tag being processed @item params the params of the current node @item layout the layout coming into the current node, before any kids were processed @item klayout the layout after processing all of the children @item kids the already-processed child nodes @end table @var{post-handler} should return two values, the layout to pass to the next node and the final tree. @item text-handler @var{text-handler} is a function of three arguments: @table @var @item text the string @item params the current params @item layout the current layout @end table @var{text-handler} should return two values, the layout to pass to the next node and the value to which the string should transform. @end table ŒCRC‰gm  ,gfilenamef sxml/fold.scmŒ   ŒŒ ´ & ŒŒ › ) ŒŒ å 4 ŒŒ ¯ @ ŒŒ ‰ Q ŒŒ œ \ ŒŒ € o ŒŒ "n s ŒŒ  "p C6