An open API service indexing awesome lists of open source software.

https://github.com/phrase/generics

The missing pieces...
https://github.com/phrase/generics

Last synced: over 1 year ago
JSON representation

The missing pieces...

Awesome Lists containing this project

README

          

# generics
The missing pieces...

## usage

### First

[embedmd]:# (example_test.go /func example.*/ / end example/)
```go
func exampleFirst(l *log.Logger) {
type Thing struct {
Name string
}

list := []*Thing{
{Name: "Parrot"},
{Name: "PhraseApp"},
}

first := First(list).(*Thing)
l.Printf("%s", first.Name)
} // end example
```