nukata/linq-in-go
View on GitHub ↗ ★ 6 Go
LINQ to Objects in Go by generic higher order functions
5 mentions on Hacker News by 1 person: 2 stories, 3 comments · first 2019-01-03 · latest 2022-04-13
20082026
-
…you prefer methods to functions, you can define methods on such a function type! In my LINQ in Go ( https://github.com/nukata/linq-in-go ), I define a higher order function type: type Enumerator[T any] func(yield func(element T)) and…
comment by suzuki · 2022-04-13 · in When to use generics -
Now the abstract sequence type of "LINQ in Go" https://github.com/nukata/linq-in-go can be written as type Enumerator(type T) func(yield func(element T)) and the "Select" method can be written as func (loop Enumerator(T)) Select(f func(T)…
comment by suzuki · 2020-06-17 · in The Next Step for Generics -
You can write your own LINQ in Go with a very short program. See https://github.com/nukata/linq-in-go for example. Here is a self-contained excerpt: type Any = interface{} type Enumerator func(yield func(element Any)) // Select creates an…
comment by suzuki · 2019-10-21 · in Loopless Programming -
▲ 3
Show HN: Wokring with Files in Golang LINQstory by suzuki · 2019-01-23 · 0 comments
-
▲ 1
Show HN: An Experimental 'LINQ to Objects' in Gostory by suzuki · 2019-01-03 · 1 comment