Find the indices of values in one list in another You must take two lists of positive integers as input, let's call these n and m. 

You may assume that:


All integers in n are part of m
All integers in m are unique
The lists are non-empty


Challenge: Return the indices of where you find the values in n, in m.

That might be confusing, but I think the test cases will make the task pretty clear. The examples are 1-indexed, you may choose 0-indexed if you want to (please specify).

n = 5 3 4 1
m = 6 8 4 1 2 5 3 100
output: 6 7 3 4    // 5 is in the 6th position of m 
                   // 3 is in the 7th position of m
                   // 4 is in the 3rd position of m
                   // 1 is in the 4th position of m

n = 5 3 4 9 7 5 7
m = 3 4 5 7 9
output: 3 1 2 5 4 3 4

n = 1 2 3 4 5 6
m = 1 2 3 4 5 6
output: 1 2 3 4 5 6

n = 16 27 18 12 6 26 11 24 26 20 2 8 7 12 5 22 22 2 17 4
m = 15 18 11 16 14 20 37 38 6 36 8 32 21 2 31 22 33 4 1 35 3 25 9 30 26 39 5 23 29 10 13 12 7 19 24 17 34 27 40 28
output: 4 38 2 32 9 25 3 35 25 6 14 11 33 32 27 16 16 14 36 18

n = 54
m = 54
output: 1


The winners will be the shortest solutions in each language. 



This is a very nice meta-post by the way!
V, 26 bytes

jòdf kÄ/&#18;-
DÓÓ
Ò&#1;C1&#27;@"Gòdk


Try it online!

This is a very strange and hacky solution, because V has little to no concept of numbers. Input comes in this format:

6 8 4 1 2 5 3 100 
5 3 4 1 


With a trailing space on each line.

Hexdump:

00000000: 6af2 6466 206b c42f 122d 0a44 d3d3 0ad2  j.df k./.-.D....
00000010: 0143 311b 4022 47f2 646b                 .C1.@"G.dk


Explanation:

j                   " Move down one line (to N) (1)
 ò                  " Recursively:
  df                "   (d)elete until you (f)ind a space. This will be saved into
                    "   register '-' (2)
     k              "   Move up one line (to M)
      Ä             "   Duplicate line M (3)
       /&lt;C-r&gt;-      "   Move the cursor forward until the next occurence of register '-' 
                    "   (the number we deleted from N)
                    "   (4)
D                   "   Delete every character *after* the cursor (5)
 ÓÓ                 "   Remove everything on this line except for whitespace
Ò&lt;C-a&gt;              "   Replace every character on this line with `&lt;C-a&gt;`, which is the 
                    "   command for incrementing a number (6)
      C             "   Delete this line into register '"', and enter insert mode
       1&lt;esc&gt;       "   Enter a '1' and return to normal mode
             @"     "   Run register '"' as V code (7)
               G    "   Go to the last line (1)
                ò   " End recursion
                 dk " Delete the last two lines (m and n)


If this doesn't make it clearer, here are examples of the buffer during the various stages the loop goes through:

Stage 1 (| is the cursor)

6 8 4 1 2 5 3 100
|5 3 4 1


Stage 2:

6 8 4 1 2 5 3 100
|3 4 1


Stage 3:

|6 8 4 1 2 5 3 100
6 8 4 1 2 5 3 100
3 4 1


Stage 4:

6 8 4 1 2 |5 3 100
6 8 4 1 2 5 3 100
3 4 1


Stage 5:

6 8 4 1 2 |
6 8 4 1 2 5 3 100
3 4 1


Stage 6:

|&lt;C-a&gt;&lt;C-a&gt;&lt;C-a&gt;&lt;C-a&gt;&lt;C-a&gt;
6 8 4 1 2 5 3 100
3 4 1


Stage 7:

|6
6 8 4 1 2 5 3 100
3 4 1


Back to stage 1:

6
6 8 4 1 2 5 3 100
|3 4 1