Inline nested function check_list