# This is bad readability

**URL:** <https://forums.fsharp.org/t/this-is-bad-readability/3546>\
**Category:** General\
**Created:** [February 21, 2024, 9:22pm UTC](https://forums.fsharp.org/t/this-is-bad-readability/3546 "2024-02-21T21:22:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![systems](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/systems/32/585_2.png) [@systems](https://forums.fsharp.org/u/systems)\
**Post date:** [February 21, 2024, 9:22pm UTC](https://forums.fsharp.org/t/this-is-bad-readability/3546/1 "2024-02-21T21:22:10Z")

</div>

The first example on [Organizing functions | F# for fun and profit](https://fsharpforfunandprofit.com/posts/organizing-functions/)  
is my opinion a very good example on bad readability

```auto
    //create a nested helper function
    let add n =
       fun x -> x + n

    // use the helper function
    x |> add y |> add z

```

add is a function that takes two argument and add them, but the code is just so convoluted  
so while what i just said its true, in reality add is a function that takes one argument and return another function that takes one argument and then add them together

this is a readability crime against programmer kind

i know that `add x n = x + n` , is in theory shorthand for the above and that functions in fsharp takes one argument and the return one value

but its actually more than just a shorthand, its an abstraction that make code more readable

i strongly advice against the code above, its bad, dont do it  
use the abstraction , use the shorthand
