This is fairly close to a working `Python` code (except I added the variable 
declaration at the very beginning):

`` var a = ["apple", "banana", "cherry"] var b = ["Ford", "BMW", "Volvo"] 
a.append(b) ``

This runs into the `Error: attempting to call undeclared routine: 'append' ``. 
The syntax for ``Nim` may of course be somewhat different, but how does one 
append items to a list, if neither `append`, nor `push`, or `put` works. `pop` 
is something in Nim, yes, but to use it seems to require a somewhat complex 
syntax, as:

`` var a = ["apple", "banana", "cherry"] var b = ["Ford", "BMW", "Volvo"] 
a.pop(b) ``

results in:

``

/usercode/in.nim(3, 2) Error: type mismatch: got <array[0..2, string], 
array[0..2, string]>|   
---|---  
  
but expected one of:

proc pop[T](): T
    first type mismatch at position: 1 required type for s: var seq[T] but 
expression 'a' is of type: array[0..2, string]

expression: pop(a, b) ``

which I can't wrap my head around yet, and so I am not sure if `pop()` and 
`append` are meant to be substitute for one and the same thing? Adding 
something else to the end of a list array?

Thanks for your patience, 

Reply via email to