Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions doc/source/streaming-analytics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ standard functions ``map`` and ``filter``.

.. code::

SELECT name, balance
FROM accounts
WHERE balance > 150;
>>> from toolz.curried import pipe, map, filter, get
>>> pipe(accounts, filter(lambda acc: acc[2] > 150),
... map(get([1, 2])),
... list)

These functions correspond to the SQL commands ``SELECT`` and ``WHERE``.

.. code::

>>> from toolz.curried import pipe, map, filter, get
>>> pipe(accounts, filter(lambda acc: acc[2] > 150),
... map(get([1, 2])),
... list)
SELECT name, balance
FROM accounts
WHERE balance > 150;

Note: this uses the `curried`` versions of ``map`` and ``filter``.

Expand Down