3 ms·
Great for doing tacit programming[1] in JavaScript: avg=ㅤ=>ㅤ.reduce((ㅤㅤ,ㅤㅤㅤ)=>ㅤㅤ+ㅤㅤㅤ)/ㅤ.length avg([3,1,4,1,5]) 2.8 [1] https://en.wikipedia.org/wiki/Ta
by abrudz 4y ago
Great for doing tacit programming[1] in JavaScript:
avg=ㅤ=>ㅤ.reduce((ㅤㅤ,ㅤㅤㅤ)=>ㅤㅤ+ㅤㅤㅤ)/ㅤ.length
avg([3,1,4,1,5])
2.8
[1] https://en.wikipedia.org/wiki/Tacit_programming https://en.wikipedia.org/wiki/Tacit_programming
- shepherdjerred 4y agoI love point-free functions languages that support them, but please tell me you're not actually do this