#
module Puppet::Parser::Functions
newfunction(:flatten, :type => :rvalue, :doc => <<-DOC
- This function flattens any deeply nested arrays and returns a single flat array
- as a result.
+ @summary
+ This function flattens any deeply nested arrays and returns a single flat array
+ as a result.
- *Examples:*
+ @return
+ convert nested arrays into a single flat array
- flatten(['a', ['b', ['c']]])
+ @example Example usage
- Would return: ['a','b','c']
+ flatten(['a', ['b', ['c']]])` returns: `['a','b','c']
- Note: from Puppet 5.5.0, the compatible function with the same name in Puppet core
- will be used instead of this function.
+ > **Note:** **Deprecated** from Puppet 5.5.0, this function has been replaced with a
+ built-in [`flatten`](https://puppet.com/docs/puppet/latest/function.html#flatten) function.
DOC
) do |arguments|