Skip to content

imclerran/roc-reduce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 variants 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 [reduce_list_left]

a = Reduce.list_left([1, 2, 3], Num.add)
b = reduce_list_left([1, 2, 3], Num.add)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages