The following code doesn't behave as I'd expect:
julia> reduce((x,y) -> (x * int(y)), 1, ["1", "2", "3"])
ERROR: no method *(ASCIIString,Int64)
in anonymous at none:1
in r_pairwise at reduce.jl:135
in reduce at reduce.jl:183
I was expecting reduce() to take my op and do something like *(*(*(1,
int("1")), int("2")), int("3")) (I understand the associativity is not
guaranteed, but * is associative anyway). Instead it gives this error. Am I
misunderstanding something?
In fact, I can't figure out how to get reduce() working with any op that
has a different output type from either of its input types. With bitext of
type Vector{(Vector{String}, Vector{String})}, I run
reduce((f_vocab, fe) -> union!(f_vocab, fe[1])::Set{S}, Set{S}(), bitext)
and get
ERROR: no method union!((Array{String,1},Array{String,1}),Array{String,1})