(t *testing.T)
| 118 | } |
| 119 | |
| 120 | func TestFold(t *testing.T) { |
| 121 | it := Slice([]int{1, 2, 3, 4, 5}) |
| 122 | ret := Fold(it, 0, func(acc, i int) int { |
| 123 | return acc + i |
| 124 | }) |
| 125 | equals(t, ret, 15) |
| 126 | } |
| 127 | |
| 128 | func TestFuse(t *testing.T) { |
| 129 | state := true |