golem
golem copied to clipboard
pure functional and generic programming for Go
Labeller fails on pull requests from forks. See the fix https://github.com/actions/labeler#permissions
`fork.Map` assumes that inner function support concurrency. However, one of the `fork` api purpose is conversion of unsafe code into thread safe. Let's image we have pool of workers. How...
The following example causes the crash for library ```go package main import ( "fmt" "github.com/fogfish/golem/optics" ) type Story struct { Text *string } func main() { l := optics.ForProduct1[*Story, *string]()...
As a Engineer I want to automate simple constructors so that allocation of new type is an "arrow function: (A, B, C) => T" eliminates the boilerplate ```go type T...
Existing `hseq` implementation supports extractions either using either type or attribute hints ```go type T struct { A A B B } seq = hseq.New[T]() hseq.ForType[T, A](seq) hseq.ForName[T](seq, "B") ```...
"In fact, since Go 1.17, it is more recommended to use the above introduced unsafe.Add function to do address offset arithmetic operations."
The idea of field selector has been discussed within https://github.com/fogfish/dynamo library The core idea: The string literal is replaced with function. However, this might bring unnecessary complexity for solving small...