thread2: Thread a function through a list, iterating on an element and...

Description Usage Arguments

Description

Thread a function through a list, iterating on an element and the output of the prior thread.

Usage

1
thread2(xs, fn)

Arguments

xs

list. The list to iterate over.

fn

function. A function that takes two arguments – the previous position and the current position – and returns one element back.


peterhurford/funtools documentation built on May 25, 2019, 1:50 a.m.