func has_close_element:bool nums:[]num threshold:num for i := range (len nums) for j := range (i + 1) (len nums) if (abs nums[i]-nums[j])