A filter is a command that can either act on a filename it sees on the command line or on the stream on STDIN.

$ filter INPUT_FILE
$ filter < INPUT_FILE
$ cat INPUT_FILE | filter