dezren39 / roc-reduce

Repository from Github https://github.comdezren39/roc-reduceRepository from Github https://github.comdezren39/roc-reduce

Reduce Functions for roc-lang

Roc-Lang GitHub last commit CI status

A small package containing a collection of reduce functions for roc data structures. Reduce behaves like walk, but doesn't require an accumulator argument, instead simply using the first element in the structure as the accumulator.

Functions are available for: List, Dict, and Set, and include left and right varients for lists, and key, value, and (key, value) versions for Dict.

Two names are provided for each function. A function named for qualified use, and a function named for unqualified use. For example:

import red.Reduce exposing [reduceListLeft]

a = Reduce.listLeft [1, 2, 3] Num.add
b = reduceListLeft [1, 2, 3] Num.add

About


Languages

Language:Roc 91.4%Language:Shell 8.6%