std-ext

module
v0.0.0-...-6197fbb Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MPL-2.0

README

std-ext

This is a collection of extensional libraries for go.

Installation

go get github.com/snowmerak/std-ext

Usage

stream
package main

import (
	"fmt"
	"github.com/snowmerak/std-ext/types/iterable/generator"
	"github.com/snowmerak/std-ext/types/iterable/stream"
)

func main() {
	g := generator.Int(0, 100, 2)
	s := stream.New[int](g)
	v := s.Filter(func(v int) bool {
		return v%3 == 0
	}).Map(func(v int) int {
		return v * 2
	}).Collect()

	fmt.Println(v)
}
[12 24 36 48 60 72 84 96 108 120 132 144 156 168 180 192]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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