Skip to content

Commit e01b872

Browse files
committed
use lazy generators
1 parent bf5122e commit e01b872

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/terms.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,12 +538,12 @@ modelcols(t::InterceptTerm{false}, d) = Matrix{Float64}(undef, size(first(d),1),
538538
modelcols(t::FormulaTerm, d::NamedTuple) = (modelcols(t.lhs,d), modelcols(t.rhs, d))
539539

540540
function modelcols(t::MatrixTerm, d::ColumnTable)
541-
mat = reduce(hcat, [modelcols(tt, d) for tt in t.terms])
541+
mat = reduce(hcat, (modelcols(tt, d) for tt in t.terms))
542542
reshape(mat, size(mat, 1), :)
543543
end
544544

545545
modelcols(t::MatrixTerm, d::NamedTuple) =
546-
reduce(vcat, [modelcols(tt, d) for tt in t.terms])
546+
reduce(vcat, (modelcols(tt, d) for tt in t.terms))
547547

548548
vectorize(x::Tuple) = collect(x)
549549
vectorize(x::AbstractVector) = x

0 commit comments

Comments
 (0)