Skip to content

Documentation for concatenating lists #308

@constantinemoseley

Description

@constantinemoseley

The manual says I can concatenate two lists in the following way:

var l1 = [1,2,3], l2 = [4, 5, 6]
print l1+l2 // expect: [1,2,3,4,5,6]

but doing this produces an error because the addition operator isn't defined for lists.

The manual should be updated to reflect the correct functionality:

var l1 = [1,2,3]
var l2 = [4,5,6]
print l1.join(l2) // expect: [1,2,3,4,5,6]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions