Learn R Programming

fable (version 0.0.0.9000)

traverse: Recursively traverse an object

Description

Recursively traverse an object

Usage

traverse(x, f = ~.x, g = ~.x, h = ~.x, base = ~is_syntactic_literal(.x)
  || is_symbol(.x))

Arguments

x

The object to traverse

f

A function (mapper) for combining the recursed components

g

A function (mapper) applied to the object before recursion

h

A function (mapper) applied to the base case

base

The base case for the recursion