1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/content/tips/write-functional-code-when-it-benefits-you.md
2021-04-06 18:27:18 +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
2021-04-06T16:07:38+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.