@lang:concat
Concatenate arrays together.
On-chain (@lang:concat!): Live parts remain unresolved until execution; each input is resolved once when the calldata is assembled.
Returns: array
Syntax
Section titled “Syntax”@lang:concat(first ...rest)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
first | array | First array to concatenate |
[...rest] | array | Additional arrays to append |
See Also
Section titled “See Also”- @flat — flatten nested arrays
On-chain face (@concat!)
Section titled “On-chain face (@concat!)”Concatenate typed arrays in order. Live arguments are resolved once each by the core (gather) before the concatenation reads them, so any number of parts may be live. Array element types must agree.
Literal parts also support strings, bytes, tuples, and nested arrays. When mixed
with a live typed array, literals inherit its element type; otherwise all literal
parts are inferred together. Empty parts inherit their siblings' type, with
uint256[] as the fallback when every part is empty.