title: Using List.nth on an 'a list list in SML
body: <p>I'm trying to declare a function takelist : 'a list list -> int -> 'a list, so that calling takelist xs n will return the elements in spot number n in the lists from xs.</p>
  
  <pre><code>takelist [[#"3", #"6"], [#"6", #"2"], [#"5", #"9"]] 1;
  </code></pre>
  
  <p>should return [#"6", #"2", #"9"].</p>
  
  <p>This is what I have:</p>
  
  <pre><code>fun tagliste (x::xs) n = List.nth(x,n);
  </code></pre>
  
  <p>I does half of what I want, and I can't figure how to get everything. I'm just getting the n from the first list instead of all of them. I've been told that map will be able to help, but so far I haven't had any luck using it correctly.</p>
  
  <p>Any help is appreciated!</p>