-module(in16).

-export([f/1]).

f(X) -> 
    case {X, first} of
        {{A, _}, Y} when Y==first -> A;
        {{_, B}, _} -> B
    end.

get_elem({{A, _B}, Y}) when Y == first ->
    A;
get_elem({{_A, B}, _Y}) ->
    B.
