Catamorphism: Difference between revisions
Content added Content deleted
(→Excel LAMBDA: Added a second example) |
m (→Excel LAMBDA) |
||
Line 652: | Line 652: | ||
# leaves the nesting depth unchanged for any other character |
# leaves the nesting depth unchanged for any other character |
||
# updates the accumulator no further if the nesting depth ever becomes negative. |
# updates the accumulator no further if the nesting depth ever becomes negative. |
||
Or for a simple count of bracket characters in a string, ignoring other characters, we could instead use FOLDLROW with an alternative binary operator like: |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
)</lisp> |
|||
Line 701: | Line 688: | ||
), |
), |
||
depth |
depth |
||
⚫ | |||
⚫ | |||
) |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
) |
) |
||
) |
) |