go-functional

module
v2.0.0-alpha.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2024 License: MIT

README

Functional Programming in Go

GitHub release (with filter) Actions Status Go Reference Go Report Card codecov

A library of iterators for use with iter.Seq.

// The first 5 natural numbers
numbers := slices.Collect(
	it.Take(it.Count(), 5),
)

// All even numbers
evens := it.Filter(it.Count(), filter.IsEven)

// String representations of integers
numbers := it.Map(it.Count(), strconv.Itoa)

Read the docs to see the full iterator library.

Directories

Path Synopsis
internal
it
filter
This package contains functions intended for use with [iter.Filter].
This package contains functions intended for use with [iter.Filter].
op

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL