Skip to content

@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

@lang:concat(first ...rest)
NameTypeDescription
firstarrayFirst array to concatenate
[...rest]arrayAdditional arrays to append
  • @flat — flatten nested arrays

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.