# \#cat

**URL:** https://discourse.julialang.org/tag/cat/570.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Type-instability of mapreduce vs. map + reduce](https://discourse.julialang.org/t/type-instability-of-mapreduce-vs-map-reduce/121136)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 18\
**Last updated:** [October 10, 2024, 4:43pm UTC](https://discourse.julialang.org/t/type-instability-of-mapreduce-vs-map-reduce/121136 "2024-10-10T16:43:03Z")

</div>

I’m a bit surprised that in this simple example, f is type-stable but g is not. Is this a JET.jl issue (@aviatesk) or a Julia issue? using JET function f(m, n) blocks = map(1:n) do i ones(m) end ret…

---

## [\`vcat(\[\], \[1 2\])\` # OK. \`vcat(\[\], \[1 "2"\])\` # Not OK](https://discourse.julialang.org/t/vcat-1-2-ok-vcat-1-2-not-ok/112991)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 18\
**Last updated:** [April 21, 2024, 5:22pm UTC](https://discourse.julialang.org/t/vcat-1-2-ok-vcat-1-2-not-ok/112991 "2024-04-21T17:22:22Z")

</div>

vcat(\[\], \[1 2\]) # OK vcat(\[\], \[1 "2"\]) # Not OK: ERROR: ArgumentError: number of columns of each array must match (got (1, 2)) \[\[\];\[1 2\]\] # OK \[\[\];\[1 "2"\]\] # Not OK: ERROR: ArgumentError: number of columns of each array…

---

## [Vcat for Vector{Any}](https://discourse.julialang.org/t/vcat-for-vector-any/111065)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 1\
**Last updated:** [March 2, 2024, 3:57pm UTC](https://discourse.julialang.org/t/vcat-for-vector-any/111065 "2024-03-02T15:57:39Z")

</div>

I have this part of code: #can't be change len::Int64 = 4 a = rand(Float64, len) a\_1 = Int64.(floor.(@view a\[1:2:len\])) a\_2 = @view a\[2:2:len\] display(a\_1) #can be changed b = vcat\[Vector{Any}(a\_1), a\_2\] It throws th…

---

## [Should passing Val(dims) to cat be better documented?](https://discourse.julialang.org/t/should-passing-val-dims-to-cat-be-better-documented/107294)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 1\
**Last updated:** [December 7, 2023, 7:34pm UTC](https://discourse.julialang.org/t/should-passing-val-dims-to-cat-be-better-documented/107294 "2023-12-07T19:34:31Z")

</div>

Would documenting the reason for passing Val(dims) to to the dims keyword of cat lead to more purrfect documentation than what we have meow? Currently the documentation for cat indicates that one can pass a Val to dims…

---

## [Slow \`reduce(vcat, itr)\`](https://discourse.julialang.org/t/slow-reduce-vcat-itr/87115)

<div class="topic-metadata">

**Author:** [@DNF](https://discourse.julialang.org/u/DNF)\
**Replies:** 26\
**Last updated:** [September 13, 2022, 11:03pm UTC](https://discourse.julialang.org/t/slow-reduce-vcat-itr/87115 "2022-09-13T23:03:50Z")

</div>

reduce(vcat, itr) and reduce(hcat, itr) have special implementations that are supposed to make them faster than vcat(itr...) and hcat(itr...), at least for long iterators. But I am seeing the opposite: It starts out ok: …

---

## [Type stability problem (Vcat, Tuple and function)](https://discourse.julialang.org/t/type-stability-problem-vcat-tuple-and-function/53862)

<div class="topic-metadata">

**Author:** [@Marcell\_Havlik](https://discourse.julialang.org/u/Marcell_Havlik)\
**Replies:** 8\
**Last updated:** [January 25, 2021, 1:24pm UTC](https://discourse.julialang.org/t/type-stability-problem-vcat-tuple-and-function/53862 "2021-01-25T13:24:43Z")

</div>

Hey Julianners, I am working on type stability and I just can’t understand what is going on here. Finally I could minimalise my example to 3 line. @code\_warntype (vcat(\[randn(1,1,3) for i in 1:3\]...)) baz() = (vcat(\[ra…
