2

Help me out a bit, functional programming fans!

I'm experimenting with functional programming through JavaScript.

I created some dummy data to experiment with and created a simple function to query the data. I would like to get all elements, whose type attribute is not 'x'. A simple solution can be seen under the 'original code' part.

Under the 'fully functional code' part I gathered some frequently used general purpose functions, which I assembled into the function composition at line 45.

I'm having a bad taste in my mouth and feel that I've gone too far. I basically replaced every language element for a function. Is this the goal of functional programming? Is this how a perfectly functional code should look like?

Comments
  • 1
    Lines 11 - 13 look pretty functional to me. Remember that any style is only good when used well.
Add Comment