We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41f6257 commit 152952cCopy full SHA for 152952c
src/utils.jl
@@ -14,10 +14,10 @@ end
14
function all_dimensions(f::F, args::AbstractDimensions...) where {F<:Function}
15
dimension_type = promote_type(typeof(args).parameters...)
16
dimension_names = static_fieldnames(dimension_type)
17
- for dim in dimension_names
18
- f((getfield(arg, dim) for arg in args)...) || return false
19
- end
20
- return true
+ return all(
+ dim -> f((getfield(arg, dim) for arg in args)...)
+ dimension_names
+ )
21
end
22
23
Base.float(q::AbstractQuantity{T}) where {T<:AbstractFloat} = convert(T, q)
0 commit comments