Remix.run Logo
almostjazz 5 hours ago

Side comment: |> and %>% aren't the same btw! The newish base pipe (|>) is faster but doesn't support using the dot (.) placeholder to pipe into something other than the first argument of a function, which can sometimes make things a little cleaner.

sinnsro 3 hours ago | parent [-]

The base pipe has an underscore as a placeholder. From the docs:

Usage:

     lhs |> rhs
Arguments:

     lhs: expression producing a value.

     rhs: a call expression. 
Details: [...]

     It is also possible to use a named argument with the placeholder
     ‘_’ in the ‘rhs’ call to specify where the ‘lhs’ is to be
     inserted.  The placeholder can only appear once on the ‘rhs’.