
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Homework 10 CIS 252 (Spring 2009) — Introduction to Computer Science
This assignment focuses on material in Chapter 18 of Haskell: The Craft of Functional Programming (HCFP).
This homework is officially due in the bin in CST 3-212 by noon on Thurs- day, April 23. However, it comes with an automatic extension: anything submitted by noon on Friday, April 24 will be accepted as being on time.
You may work singly or in pairs on this assignment.
As always, you’re expected to follow the design recipe discussed in lec- ture.
Turn in a hard copy of your source code and a transcript demonstrating convincingly that your code is correct. Also, submit your code (but not transcript) electronically.
printBack :: Int -> IO ()
such that (printBack n) reads n lines of text and then displays them, one per line, in reverse order. For example, your function should have the following behavior:
Main> printBack 4 here’s one line here’s a second and the third fourth (and last) fourth (and last) and the third here’s a second here’s one line
Page 1