# Findall return type

**URL:** <https://discourse.julialang.org/t/findall-return-type/68971>\
**Category:** General Usage\
**Tags:** question\
**Created:** [September 29, 2021, 11:12pm UTC](https://discourse.julialang.org/t/findall-return-type/68971 "2021-09-29T23:12:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg\_plowman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/greg_plowman/32/8100_2.png) [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Post date:** [September 29, 2021, 11:12pm UTC](https://discourse.julialang.org/t/findall-return-type/68971/1 "2021-09-29T23:12:18Z")

</div>

Following from related discussion [Keeping Up With The Cartesians - Findall Return Type](https://discourse.julialang.org/t/keeping-up-with-the-cartesians-findall-return-type/37298)

I understand that `findall` returns a list of `CartesianIndex` for a `Matrix`, which I guess makes sense.

But compare this to `eachindex` which returns an iterable object with the most efficient indexing (linear for `Matrix`)

`pairs` allows an argument to specify the indexing style:

```julia
pairs(IndexLinear(), A)
pairs(IndexCartesian(), A)
pairs(IndexStyle(A), A)

```

Is it unreasonable that `findall` return the `IndexStyle` of the argument?
