[PR #4740] docs: fix example pregel reducer #4036

Closed
opened 2026-02-20 17:49:33 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/4740

State: closed
Merged: Yes


Hi,
I have spotted a typo in the reducer examples of pregel graph, part "BinaryOperatorAggregate"

previous example code:

def reducer(current, update):
        if current:
            return current + " | " + "update"
        else:
            return update

corrected version

def reducer(current, update):
        if current:
            return current + " | " + update
        else:
            return update
**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/4740 **State:** closed **Merged:** Yes --- Hi, I have spotted a typo in the reducer examples of pregel graph, part "BinaryOperatorAggregate" previous example code: ```python def reducer(current, update): if current: return current + " | " + "update" else: return update ``` corrected version ```python def reducer(current, update): if current: return current + " | " + update else: return update ```
yindo added the pull-request label 2026-02-20 17:49:33 -05:00
yindo closed this issue 2026-02-20 17:49:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#4036