This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
ziptuples(a, b) | |
Zips tuples `a` and `b` in a fast, type-stable way. If they have different | |
lengths, the result is trimmed to the length of the shorter tuple. | |
""" | |
@generated function ziptuples(a::NTuple{N,Any}, b::NTuple{M,Any}) where {N,M} | |
ex = Expr(:tuple) | |
for i = 1:min(N, M) |
NewerOlder