generics

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Func

func Func[S int | float64](s S) S

Func is a generic function.

Types

type Generic

type Generic[T any] struct {
	Field T
}

Generic is a generic struct.

func NewGeneric

func NewGeneric[T any](param T) Generic[T]

NewGeneric produces a new Generic struct.

func (Generic[T]) Method

func (g Generic[T]) Method()

Method is a method of a generic type.

Jump to

Keyboard shortcuts

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