extract_from -> head_or_tail