Thread
#stdlib
    voddan

    voddan

    5 years ago
    +
    on
    Iterable
    is not it since it returns a list
    m

    mg6maciej

    5 years ago
    voddan:
    List
    is
    Iterable
    , so what's the problem with using
    +
    and treating result as
    Iterable
    ?
    voddan

    voddan

    5 years ago
    The initial question implied that an iterator would be created which would delegate to the initial lists without allocating additional space
    m

    mg6maciej

    5 years ago
    Ohh... the costs. Maybe I will have a project where I need to worry about them too.
    voddan

    voddan

    5 years ago
    If you do
    l1 + l2 + l3 + l4 + l5
    you allocate N^2 with lists. You may actually notice that 😉
    m

    mg6maciej

    5 years ago
    N-1