R/MRatCalcpowered by RiX

RiX walkthrough 6

Transforming data

Build finite inputs, then map and filter their values.

Make and transform an array

At this point you know arrays and functions. A generator can make a finite input array; a map pipe transforms each item. This returns [1, 4, 9, 16].

Runnable RiX

Keep only useful results

Filter runs a predicate for each value. The cell below returns [3, 4].

Runnable RiX

See Pipes for mapping, filtering and reducing, then Generators for finite patterns. Regex and strings, lazy generators, async concurrency and streams are optional continuations once ordinary finite transformations are comfortable.

Continue with Cells, shared state and patterns to learn when values should be updated deliberately, or practice Transform a report.