pub fn reverse(value: Value, _: HashMap<String, Value>) -> Result<Value> {
    match value {
        Value::Array(mut arr) => {
            arr.reverse();
            Ok(to_value(&arr)?)
        }
        Value::String(s) => Ok(to_value(&String::from_iter(s.chars().rev()))?),
        _ => bail!(
            "Filter `reverse` received an incorrect type for arg `value`: \
             got `{}` but expected Array|String",
            value.to_string()
        ),
    }
}
// Reverses the elements of an array or the characters in a string.
Reverses the elements of an array or the characters in a string.
Reverses the elements of an array or the characters in a string .
pub fn reverse(value: Value, _: HashMap<String, Value>) -> Result<Value> {
    match value {
        Value::Array(mut arr) => {
            arr.reverse();
            Ok(to_value(&arr)?)
        }
        Value::String(s) => Ok(to_value(&String::from_iter(s.chars().rev()))?),
        _ => bail!(
            "Filter `reverse` received an incorrect type for arg `value`: \
             got `{}` but expected Array|String",
            value.to_string()
        ),
    }
}
pub fn reverse ( value : Value , _ : HashMap < String , Value > ) -> Result < Value > { match value { Value :: Array ( mut arr ) => { arr . reverse ( ) ; Ok ( to_value ( & arr ) ? ) } Value :: String ( s ) => Ok ( to_value ( & String :: from_iter ( s . chars ( ) . rev ( ) ) ) ? ) , _ => bail ! ( " \
 " value to_string ( ) ) , } }
Reverses the elements of an array or the characters in a string.
Reverses the elements of an array or the characters in a string .
value
HashMap<String, Value>
value
HashMap<String, Value>