Source file test/typeparam/issue50486.dir/main.go
1 package main 2 3 import fp "./goerror_fp" 4 5 func Fold[A, B any](zero B, a A, f func(B, A) B) B { 6 return f(zero, a) 7 } 8 9 func main() { 10 11 var v any = "hello" 12 Fold(fp.Seq[any]{}, v, func(seq fp.Seq[any], v any) fp.Seq[any] { 13 return seq.Append(v) 14 }) 15 16 } 17