· Note that extracting the constant expressions also happens to avoid the nested forEach/filter loop. ... – Doc Brown. Mar 13 at 8:55. 17 DocBrown Conversely, a language that doesn't allow you to do this can be considered unreasonable, and you should try to avoid using it. – Barmar. Mar 13 at 16:18. 7... if you split that oneliner into separate functions each with one responsibility, and ...