Documentation ¶
Index ¶
- func Expect(t *testing.T, expect string, actual interface{})
- func ExpectNear(t *testing.T, expect float64, actual float64, acc float64)
- func Filter(in interface{}, fn filterf) interface{}
- func Float64Filter(slice []float64, f filterFloat64) []float64
- func IntFilter(slice []int, f filterInt) []int
- func IntSequence(begin int) func() int
- func Map(in interface{}, fn mapf) interface{}
- func Reduce(in interface{}, memo interface{}, fn reducef) interface{}
- type Dictionary
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Filter ¶
func Filter(in interface{}, fn filterf) interface{}
Filter(slice, predicate func) Usage:
d := Filter(b, func(val interface{}) bool { return val.(int) % 4 == 0 })
func Float64Filter ¶
func IntSequence ¶
Return sequence integers with the begining value as x
Types ¶
type Dictionary ¶
type Dictionary struct {
// contains filtered or unexported fields
}
func NewDictionary ¶
func NewDictionary(minId int) *Dictionary
func (*Dictionary) AddName ¶
func (d *Dictionary) AddName(name string) int
func (*Dictionary) GetIdFromName ¶
func (d *Dictionary) GetIdFromName(name string) int
func (*Dictionary) GetNameFromId ¶
func (d *Dictionary) GetNameFromId(id int) string
Click to show internal directories.
Click to hide internal directories.