On Sunday, June 21, 2020 at 11:21:29 PM UTC-4, Ian Lance Taylor wrote:
>
> On Sat, Jun 20, 2020 at 7:30 PM T L >
> wrote:
> >
> > On Saturday, June 20, 2020 at 4:48:07 PM UTC-4, Ian Lance Taylor wrote:
> >>
> >> On Sat, Jun 20, 2020 at 8:26 AM T L wrote:
> >> >
> >> > For example, if
On Sat, Jun 20, 2020 at 7:30 PM T L wrote:
>
> On Saturday, June 20, 2020 at 4:48:07 PM UTC-4, Ian Lance Taylor wrote:
>>
>> On Sat, Jun 20, 2020 at 8:26 AM T L wrote:
>> >
>> > For example, if there is a builtin convertible(from, to) constraint,
>> > We can define a slice conversion function as
On Saturday, June 20, 2020 at 4:48:07 PM UTC-4, Ian Lance Taylor wrote:
>
> On Sat, Jun 20, 2020 at 8:26 AM T L >
> wrote:
> >
> > For example, if there is a builtin convertible(from, to) constraint,
> > We can define a slice conversion function as
> >
> > func Convert(type Ta, Tb
On Sat, Jun 20, 2020 at 8:26 AM T L wrote:
>
> For example, if there is a builtin convertible(from, to) constraint,
> We can define a slice conversion function as
>
> func Convert(type Ta, Tb converitble(Ta, Tb)) (avs []Ta, _Tb) (bvs []Tb) {
>bvs = make([]Tb, 0, len(avs)
>for _, v :=
For example, if there is a builtin convertible(from, to) constraint,
We can define a slice conversion function as
func Convert(type Ta, Tb converitble(Ta, Tb)) (avs []Ta, _Tb) (bvs []Tb) {
bvs = make([]Tb, 0, len(avs)
for _, v := range avs {
bvs = append(bvs, Tb(v))
}
return bvs