Changeset 14798 in project


Ignore:
Timestamp:
05/26/09 19:40:31 (10 years ago)
Author:
sjamaan
Message:

Describe {row,column}-fold-right

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/postgresql

    r14795 r14798  
    156156* <procedure>(row-fold* KONS KNIL RESULT)</procedure>
    157157
    158 This is the fundamental fold operator for result sets. It calls
     158This is the fundamental result set iterator. It calls
    159159{{(kons row seed)}} for every row, where {{row}} is the list of
    160160values in the current row and {{seed}} is the accumulated result
    161 from previous calls (initially {{knil}}).  It returns the final
    162 accumulated result.
     161from previous calls (initially {{knil}}), ie its pattern looks
     162like {{(KONS ROWN ... (KONS ROW2 (KONS ROW1 KNIL)))}}.  It returns
     163the final accumulated result.
    163164
    164165The starred version works the same, except it calls
    165 {{(kons col1 col2 ... seed)}} instead, so the procedure must
    166 know how many columns you have in the result set.
     166{{(kons rowN-col1 rowN-col2 ... seed)}} instead of {{(kons rowN seed)}},
     167so the procedure must know how many columns you have in the result set.
    167168
    168169<examples>
     
    218219</example>
    219220</examples>
     221
     222* <procedure>(row-fold-right KONS KNIL RESULT)</procedure>
     223* <procedure>(row-fold-right* KONS KNIL RESULT)</procedure>
     224
     225The fundamental result set recursion operator;  Calls
     226{{(KONS COL1 (KONS COL2 (KONS ... KNIL)))}} instead of
     227{{(KONS COLN ... (KONS COL2 (KONS COL1 KNIL)))}}.
     228
     229* <procedure>(column-fold-right KONS KNIL RESULT)</procedure>
     230* <procedure>(column-fold-right* KONS KNIL RESULT)</procedure>
     231
     232Column variants of {{row-fold-right}}/{{row-fold-right*}}.
    220233
    221234* <procedure>(row-for-each PROC RESULT)</procedure>
Note: See TracChangeset for help on using the changeset viewer.