interact package:string-class

Take a function of type Text -> Text as its argument The entire input from the standard input device is passed to this function as its argument, and the resulting string is output on the standard output device.