1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 05:14:04 +00:00
laravel-tips/content/tips/write-functional-code-when-it-benefits-you.md
2021-04-07 20:16:47 +02:00

541 B

title tweet_id thread_slug author_username images created_at slug
Write functional code when it benefits you 1272826462031286272 laravel-clean-code-tactics samuelstancl
https://pbs.twimg.com/media/Ean8cQUWoAEjdO3.jpg
2020-06-16T09:40:51+00:00 write-functional-code-when-it-benefits-you

Functional code can both clean things up and make them impossible to understand. Refactor common loops into functional calls, but don't write stupidly complex reduce()s just to avoid writing a loop. There's a use case for both.