**@wiffel**, Oh! `items()`. That makes perfect sense. Thanks.
I'm still wondering about the JSON problem. (Maybe I should try a separate
thread for that. But here is the last issue in this thread:
proc reversed(s: string): string =
result = newString(s.len)
for i,c in s:
result[s.high - i] = c
proc rc(s: string): seq[char] =
return future.lc[c| (c <- items(reversed(s))), char]
echo(rc("Gattaca"))
@[a, c, a, t, t, a, G]
But that's wrong. Here is what I want:
proc rc(s: string): seq[char] =
return future.lc[ rcmap[c] | (c <- items(reversed(s))), char ]
echo(rc("Gattaca"))
graph_to_utgs.nim(29, 25) Error: could not resolve: rcmap[c]
At first, I thought the problem was the list-comprehension, but in fact, I get
the same message from this simple code:
for a in tables.keys(rcmap):
echo $a, rcmap[a]
*
[https://github.com/nim-lang/Nim/issues/3548](https://github.com/nim-lang/Nim/issues/3548)
What am I doing wrong? Isn't `rcmap` a simple `table[char,char]`?