"Chaining method calls is a syntax issue and not a function issue, and writing functions to return a certain thing just to cater to how you like to write programs is hacking around a missing language feature."http://github.com/raganwald/homoiconic/blob/master/2011/11/s...
"One thing that expressive languages like Ruby, Smalltalk, and Lisp teach us is that many 'design patterns' are actually language smells. The 'fluent interface' design patterns is just that: A sign that a language is missing a cascading message feature."
When a language has a (sub)community that uses so many side-effectful interfaces that cascading message syntax sounds like a relief, that community-wide design pattern might be the more appropriate thing to repair. :-p
Anyway, I use my own custom infix operator for such purposes: ;it.
-- who needs this ---
array
.pop()
.pop()
.pop()
-- when there's this --
var it = array ;it.
pop() ;it.
pop() ;it.
pop();
Just kidding around. I haven't developed a pattern in these cases, probably because I program with few side effects and few OO interfaces and because I sooner or later bury any interface I'm working with under layers of my own.