Cleaner Code with Functional Concepts

7 December, 2015, Aten Design Group

As developers, we’re all constantly searching for the cleanest way to write something. Writing that elegant one-liner or refactoring something ugly gives us a deep sense of satisfaction. Unfortunately, working with Drupal forces us to deal with deeply nested arrays that encourage ugly, cumbersome code. … There’s another way though… With some simple concepts from functional programming, we can avoid those ugly, deeply-nested loops and conditionals that we often see in the Drupal ecosystem.