## ----pipe1s-------------------------------------------------------------------
library("wrapr")

cos(exp(sin(4)))

4 %.>% sin(.) %.>% exp(.) %.>% cos(.)

## ----pipe1--------------------------------------------------------------------
1:4 %.>% .^2 

## ----pipe2--------------------------------------------------------------------
5 %.>% sin(.)

5 %.>% base::sin(.)

## ----peager-------------------------------------------------------------------
f <- function() { sin }

# returns f() ignoring dot, not what we want
5 %.>% f()

# evaluates f() early then evaluates result with .-substitution rules
5 %.>% .(f())

