Clearly having composable functions is a powerful idea. That's essentially part of the reason shell scripts are so successful. A well behaved shell script is a F(Lines)->Lines. which means you could actually write the above code like this:
x|foo|bar|baz|quux
And any step in the pipeline produced an empty output, that would be automatically carried through. This is one reason why having a.b.c through a NPE in java is not always ideal. In objective-c you can pass any message to nil, so [[a b] c] is defined even if a.b is nil. Imagine what a pain it would be if `cat file | grep a | grep b` blew up because file was empty or a was not found.
x|foo|bar|baz|quux
And any step in the pipeline produced an empty output, that would be automatically carried through. This is one reason why having a.b.c through a NPE in java is not always ideal. In objective-c you can pass any message to nil, so [[a b] c] is defined even if a.b is nil. Imagine what a pain it would be if `cat file | grep a | grep b` blew up because file was empty or a was not found.