That's not list comprehension in nim, you just iterated over two strings and 
then joined the elements without using them.
    
    
    proc cross(a, b: string): seq[string] =
      for ac in a:
        for bc in b:
          result.add(ac & bc)
    
    let digits = "123456789"
    let letters = "ABCDEFGHI"
    echo  cross(letters, digits)
    
    
    Run

Reply via email to