Proposal Details
It is possible to range over expressions of type func(func()bool) (and similar), but there's no simple way to test whether a given type allows range-variable-less ranging, or to perform a range over a reflect.Value of such a type.
Methods reflect.Type.CanSeq0 and reflect.Value.Seq0, implemented in the manner of corresponding Seq and Seq2 methods, would solve this.
Proposal Details
It is possible to
rangeover expressions of typefunc(func()bool)(and similar), but there's no simple way to test whether a given type allows range-variable-less ranging, or to perform a range over areflect.Valueof such a type.Methods
reflect.Type.CanSeq0andreflect.Value.Seq0, implemented in the manner of correspondingSeqandSeq2methods, would solve this.