op

package
v2.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Identity

func Identity[V any](value V) V

Identity returns the provided value.

Example
package main

import (
	"fmt"

	"github.com/BooleanCat/go-functional/v2/iter"
	"github.com/BooleanCat/go-functional/v2/iter/op"
)

func main() {
	for i := range iter.Lift([]int{1, 2, 3}).Transform(op.Identity) {
		fmt.Println(i)
	}

}
Output:

1
2
3

Types

This section is empty.

Jump to

Keyboard shortcuts

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