Ordered conjunction
This function retains a value only when both ordered conditions hold. The generated Go preserves the conjunction stated in the source.
Stated source
Define filter-by-two-thresholds as a function.It accepts an integer sequence named input, an integer named threshold, and another integer named other-threshold.Collect the input values in encounter order into a fresh sequence. Retain each value only when it is greater than the threshold and it is greater than the other-threshold.Generated Go
go
package generated
func FilterByTwoThresholds(p0 []int64, p1 int64, p2 int64) ([]int64, error) {
result := make([]int64, 0)
for _, value := range p0 {
if value > p1 && value > p2 {
result = append(result, value)
}
}
return result, nil
}