-module(convert). -export([main/0, convert/1]). main() -> [_,_] = convert({a,b}), {_,_} = convert([a,b]), [_,_] = convert([a,b]), {_,_} = convert({a,b}). -spec convert(tuple()) -> list() ; (list()) -> tuple(). convert(Tup) when is_tuple(Tup) -> tuple_to_list(Tup); convert(L = [_|_]) -> list_to_tuple(L).