<?php
$a = [7,2,1,3,9,0,4,6];
$b = [3,1,0,2,3,4,5,6,7];
echo join(array_map(function($i) use($a) {
return $a[$i];
}, $b));
elixir
a = [7,2,1,3,9,0,4,6]
b = [3,1,0,2,3,4,5,6,7]
IO.puts(b |> Enum.map(fn(i) ->
Enum.at(a, i) end) |> Enum.join)
swift
let a = [7,2,1,3,9,0,4,6]
let b = [3,1,0,2,3,4,5,6,7]
print(b.map({(i: Int) -> String in String(a[i])}).joinWithSeparator(""))