JuliaCollections / FunctionalCollections.jl

Functional and persistent data structures for Julia
MIT License
124 stars 34 forks source link

Cannot filter over PersistentVector{Tuple{T,U}} #36

Closed hessammehr closed 5 years ago

hessammehr commented 7 years ago
a = PersistentVector([(1,2), (3,4)])
filter(x->true, a)

Produces the following error on Julia 0.5.1 and nightly: ERROR: MethodError: Cannotconvertan object of type Int64 to an object of type Tuple{Int64,Int64}

The following work just fine:

filter(x->true, [ (1,2), (3,4) ]) # => [(1,2), (3,4)]
filter(x->true, PersistentVector(1,2,3,4))  # => Persistent{Int64}[1, 2, 3, 4]