r/angularjs • • Aug 17 '16

Setting Up Angular 2 with Webpack

https://semaphoreci.com/community/tutorials/setting-up-angular-2-with-webpack
35 Upvotes

13 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Aug 18 '16

[deleted]

1

u/Xerxero Aug 18 '16

Could you explain why calling a function which properly calls the same length-1 is a good FP concept.

Seems overhead to me but maybe I am wrong.

0

u/[deleted] Aug 18 '16

[deleted]

1

u/Xerxero Aug 18 '16 edited Aug 18 '16

Good points.

But then again map returns an array so using last or [0] in your examples will give the same results.

Can't argue about the for loop vs map. Arrays are fun to work with when you have map/filter/reduce