Catamorphism: Difference between revisions
m
→Excel LAMBDA
(→Excel LAMBDA: Added a second example) |
m (→Excel LAMBDA) |
||
Line 652:
# leaves the nesting depth unchanged for any other character
# updates the accumulator no further if the nesting depth ever becomes negative.
<lang lisp>bracketCount▼
=LAMBDA(a,▼
LAMBDA(c,▼
IF(ISNUMBER(FIND(c, "[]", 1)),▼
1 + a,▼
a▼
)▼
)▼
Line 701 ⟶ 688:
),
depth
▲ )
▲ )
)
▲=LAMBDA(a,
▲ LAMBDA(c,
▲ IF(ISNUMBER(FIND(c, "[]", 1)),
▲ 1 + a,
▲ a
)
)
|