Yes and no. I find short lambdas easier to read. In lisp you have flet, labels, which allows you to name the elements without introducing external functions.
But of course there are cases where the proposed is useful, e.g. for reuse. I can imagine applyModifiers could be called in more than one place.
Anyway, upvoted because it's an interesting discussion.
May be personal preference, but d2 blows mermaid out of the water. And it is a single executable, no npm needed.