Git Product home page Git Product logo

lang-gg's Introduction

Quick Start

go get github.com/hyphennn/glamda@latest
package main

import (
	"fmt"

	"github.com/hyphennn/glamda/gstream"
)

func main() {
	s := []int{1, 1, 4, 5, 1, 4, 114514, 0, 0, 0}
	s2 := gstream.AsSliceStream(s).Filter(func(i int) bool {
		return i%2 == 0
	}).Convert(func(i int) int {
		return i + 1
	}).Sort(func(t1, t2 int) bool {
		return t1 < t2
	}).Collect()
	fmt.Println(s2) // [1 1 1 5 5 114515]
}

致力于构建一个 Go Stream API 以及一些常用的泛型、闭包工具,并且不引入任何第三方依赖以及过多的性能消耗

Source of inspiration: Bytedance code.byted.org.lang/gg

This package was not open source when the author resigned, and a similar repository was not found, so this package was made based on some ideas from the Java Stream API and lang/gg

致力于构建一个 Go Stream API 以及一些常用的泛型、闭包工具,并且不引入任何第三方依赖以及过多的性能消耗

灵感来源:字节跳动 code.byted.org/lang/gg

此包在作者离职时仍未开源,也未找到一个类似的仓库,因此基于 Java Stream API 以及 lang/gg 的一些**做了此包

lang-gg's People

Contributors

hyphennn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.