Esempio n. 1
0
func main() {
	a, _ := fuzzybool.New(0)
	b, _ := fuzzybool.New(.25)
	c, _ := fuzzybool.New(.75)
	d := c.Copy()
	if err := d.Set(1); err != nil {
		fmt.Println("err")
	}
	process(a, b, c, d)
	s := []*fuzzybool.FuzzyBool{a, b, c, d}
	fmt.Println(s)
}
Esempio n. 2
0
func main() {
	a, _ := fuzzybool.New(0)   // Safe to ignore err value when using
	b, _ := fuzzybool.New(.25) // known valid values; must check if using
	c, _ := fuzzybool.New(.75) // variables though.
	d := c.Copy()
	if err := d.Set(1); err != nil {
		fmt.Println(err)
	}
	process(a, b, c, d)
	s := []*fuzzybool.FuzzyBool{a, b, c, d}
	fmt.Println(s)
}