prepend: Prepend adds an element to the list through recursion.

Description Usage Arguments Value

Description

This is the primary list building tool. Although the user might usually prefer to work with append, it is incredibly useful to use prepend in other functions that work on functional lists. In fact, we need this function to implement append.

Usage

1

Arguments

ls

A function, with class fl, that operates as a functional list object

el

A data element (from R's standard data types) to add to the list

Value

A closure with the fl class added. The closure can be used to access different properties of the list: either the head, tail or its empty status.


michaelquinn32/lambdaList documentation built on May 22, 2019, 9:52 p.m.