Ruby | Set flatten!() function
The flatten!() is an inbuilt method in Ruby replaces the receiver with the result in place. Returns nil if no modifications were made.
Parameters: The function does not takes any parameter.
Return Value: It returns the receiver with the result in place, or else returns nil if no changes are made.