# What is the relation between Array{Int64,1} and AbstractSet{Int64}?

**URL:** <https://discourse.julialang.org/t/what-is-the-relation-between-array-int64-1-and-abstractset-int64/26590>\
**Category:** General Usage\
**Created:** [July 20, 2019, 4:57pm UTC](https://discourse.julialang.org/t/what-is-the-relation-between-array-int64-1-and-abstractset-int64/26590 "2019-07-20T16:57:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [July 20, 2019, 4:57pm UTC](https://discourse.julialang.org/t/what-is-the-relation-between-array-int64-1-and-abstractset-int64/26590/1 "2019-07-20T16:57:17Z")

</div>

Hi, the following is the code, which confuses me.

```julia
function myF( a::AbstractSet{Int} )
              for element in a
                   print(element)
              end
end

b = Dict( 1 => 2, 2 => 3, 3 =>4 )

myF(collect(keys(b)))

```

I understand that `collect(keys(b))` would return an array. Based on the definition, the function `myF` would apply to an abstract set, right? So, why calling myF(collect(keys(b))) does not give any errors at all?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [July 20, 2019, 5:19pm UTC](https://discourse.julialang.org/t/what-is-the-relation-between-array-int64-1-and-abstractset-int64/26590/2 "2019-07-20T17:19:10Z")

</div>

> [@bsnyh](#):
>
> So, why calling myF(collect(keys(b))) does not give any errors at all?

It does.

Make sure your run it from a fresh process.
