Today I Learned - Rocky Kev

Tagged “functional-programming”

  1. TIL writing a clean function

    Write an assert at the beginning of the function. Then, write down all the conditions that must be met.

  2. TIL about the proposed pipe operator

    In functional programming, you chain functions to provide a result. Witht he Pipe operator, it can look like this: const total = money |> removeOneDollar |> addTwoDollars |> addFiveDollars

  3. TIL Avoiding dependencies in your helper functions

    Impure functions for helpers? What is this... 1999?

  4. TIL mutations and how to sort without mutating

    Mutation isn't bad. It CAN cause side effects and ruin your life. There's times when you want to have your objects mutate. For everything else, switch to functional programming and passing the data.

  5. TIL Pure and Impure Functions

    A important piece of Functional Programming is creating Pure Functions. NO SIDE EFFECTS

See all tags.