Learn R Programming

cppcontainers (version 1.0.4)

reverse: Reverse element order

Description

Reverses the order of the elements in the container by reference.

Usage

reverse(x)

Value

Invisibly returns NULL.

Arguments

x

A CppForwardList or CppList object.

Examples

Run this code
l <- cpp_forward_list(4:9)
l
# 4 5 6 7 8 9

reverse(l)
l
# 

Run the code above in your browser using DataLab