I do cat x | grep y, because that way you separate out the primary data being passed around and the secondary instructions for how to process it. Preferring functional programming, this is my bread and butter. It´s superior readability and simplicity is something that gets engraved on the inside of your mind after you do a pipe a few hundred times per day every day. This is not about being terse, terseness is almost never a factor.
(->
¨log.txt¨
read-to-string
´(prepend ¨\n¨)
´(prepend ¨piping¨)
lines-to-strings
first
´(= ¨piping´)
)
To think of writing (read-to-string ¨log.txt¨) in the above pipe is wrong. Might as well load on more functions on the input line:
(->
(prepend ¨piping¨ (prepend ¨\n¨ (read-to-string ¨log.txt¨)))
lines-to-strings
first
´(= ¨piping´)
)
The simple principle that emerges is that the first line is for input, not for applying functions. You might guess that someone who does this even in a pipe as simple as cat x | grep y has this muscle memory too, but someone who criticizes it, certainly doesn´t. Maybe that´s not a bad thing, but you do feel a large divide between each other.