Code = [ 1,2,3 ].
[{A,B,C} || A <- Code, B <- Code, C <- Code ].
12> F = fun(A) -> integer_to_binary(binary_to_integer(A, 3) + 1, 3) end.
#Fun
13> F(<<"000">>).
<<"1">>
14> F(<<"001">>).
<<"2">>
15> F(<<"002">>).
<<"10">>
16> F(<<"010">>).
<<"11">>
17> F(<<"210">>).
<<"211">>