-module(in14).

-export([f/1]).

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

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