>>4
Seems like an unfold-like procedure would work well for writing data to ports, a fold-like procedure for reading data from ports, and a map-like procedure for reading and writing data to ports.
There are common operations like reading from a port, char by char, performing some transformation on the char, then writing it to another port, that could easily be generalised with a map or for-each-like procedure.