Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type People

type People struct {
	// contains filtered or unexported fields
}

People is an immutable type and has the following template:

[]*Person

func NewPeople

func NewPeople(s ...*Person) *People

func NewPeopleLen

func NewPeopleLen(l int) *People

func (*People) Append

func (m *People) Append(v ...*Person) *People

func (*People) AsImmutable

func (m *People) AsImmutable(v *People) *People

func (*People) AsMutable

func (m *People) AsMutable() *People

func (*People) Get

func (m *People) Get(i int) *Person

func (*People) IsDeeplyNonMutable

func (s *People) IsDeeplyNonMutable(seen map[interface{}]bool) bool

func (*People) Len

func (m *People) Len() int

func (*People) Mutable

func (m *People) Mutable() bool

func (*People) Range

func (m *People) Range() []*Person

func (*People) Set

func (m *People) Set(i int, v *Person) *People

func (*People) WithImmutable

func (m *People) WithImmutable(f func(mi *People)) *People

func (*People) WithMutable

func (m *People) WithMutable(f func(mi *People)) *People

type Person

type Person struct {
	// contains filtered or unexported fields
}

Person is an immutable type and has the following template:

struct {
	Name	string
	Age	int
}

func NewPerson

func NewPerson(name string, age int) *Person

func (*Person) Age

func (s *Person) Age() int

func (*Person) AsImmutable

func (s *Person) AsImmutable(v *Person) *Person

func (*Person) AsMutable

func (s *Person) AsMutable() *Person

func (*Person) IsDeeplyNonMutable

func (s *Person) IsDeeplyNonMutable(seen map[interface{}]bool) bool

func (*Person) Mutable

func (s *Person) Mutable() bool

func (*Person) Name

func (s *Person) Name() string

func (*Person) SetAge

func (s *Person) SetAge(n int) *Person

SetAge is the setter for Age()

func (*Person) SetName

func (s *Person) SetName(n string) *Person

SetName is the setter for Name()

func (*Person) WithImmutable

func (s *Person) WithImmutable(f func(si *Person)) *Person

func (*Person) WithMutable

func (s *Person) WithMutable(f func(si *Person)) *Person