# Transforming data and Elixir syntax style

**URL:** <https://forum.elixirforum.com/t/transforming-data-and-elixir-syntax-style/13027>\
**Category:** Discussions\
**Tags:** code-style, syntax, credo\
**Created:** [March 12, 2018, 9:48am UTC](https://forum.elixirforum.com/t/transforming-data-and-elixir-syntax-style/13027 "2018-03-12T09:48:55Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![peerreynders](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/peerreynders/32/5826_2.png) [@peerreynders](https://forum.elixirforum.com/u/peerreynders)\
**Post date:** [March 12, 2018, 8:56pm UTC](https://forum.elixirforum.com/t/transforming-data-and-elixir-syntax-style/13027/7 "2018-03-12T20:56:05Z")

</div>

> [@minhajuddin](#):
>
> Doesn’t it hamper readability?

Depends on your perspective.

I initially didn’t like the style **_at all_** and always wanted to start the pipeline with a fully populated function. The way I made my peace with it was to accept that the pipeline is in effect emulating (lambda calculus style) function composition, something that only works when all the functions involved only have a **_single_** parameter.

```
|> Enum.take(5)

```

is _suggestive_ of a partial application to bring `Enum.take/2` down to an arity of 1. In the case of

```
|> :crypto.strong_rand_bytes

```

`:crypto.strong_rand_bytes` is already at an arity of 1 - so it is ready to be composed as is.

This in effect places more emphasis on the composition than the value that enters it.

---

_[View the full topic](https://forum.elixirforum.com/t/transforming-data-and-elixir-syntax-style/13027)._
