If we write out the types for Map(Apply(input), fs) everything works. If we write them out on the first line, and then omit them on the second, it works. But if we just omit them, the compiler returns errors (below) from the translated code; it seems to somehow be inferring func(string) string instead of func(string) (string, error) or something.
Sample errors:
./prog.go2:13: cannot use Apply(input) (type func(func(string) (string, error)) (string, error)) as type func(func(string) string) (string, error) in argument to instantiate୦୦Map୦func୮8string୮9୮0୮8string୮3୮0error୮9୦string
./prog.go2:13: cannot use fs (type []func(string) (string, error)) as type []func(string) string in argument to instantiate୦୦Map୦func୮8string୮9୮0୮8string୮3୮0error୮9୦string
Consider the following code:
If we write out the types for
Map(Apply(input), fs)
everything works. If we write them out on the first line, and then omit them on the second, it works. But if we just omit them, the compiler returns errors (below) from the translated code; it seems to somehow be inferringfunc(string) string
instead offunc(string) (string, error)
or something.Sample errors:
Playground link: https://go2goplay.golang.org/p/J-5HQfAPIwM
The text was updated successfully, but these errors were encountered: