Mon 13:00-13:50
Slides for lecture 1 2 3 4 5 6
Learn You a Haskell for Great Good
Try Haskell in your browser, with nice interactive basic tutorial.
Inline comments appreciated.
Test cases, and maybe even a test jig of some sort, is a good habit, and in the case of Haskell programs a particularly good idea for your own sanity.
For each assignment, please turn in whatever you have before the deadline; don't skip class to work on it! My teaching methodology for these is "keep working on it until it is actually done", like a project at work. This means if you or I find problems in your code, please work on it until they are ironed out and send me the updated version. I am happy to give feedback or assistance with intermediate (partly working) versions.
-- Breaks string into lines, returning list of lines. Squeezes out -- multiple spaces, and initial and final spaces. Numeric argument -- is maximum line length. justifyPar :: Int -> String -> [String] -- Calling this justifyPar 72 " stowaways carnival taxes radioactivity's Micky tearjerker toughing gall questionnaire's sleepwalking Aldan's Salem's game announce hygrometer's scriptwriter meow saleswoman sanitarium's gulf's somnolent kitten's lousiness's! ski zealous Diocletian's Fomalhaut's whacks wreaked brings craftiness temping dehumanization's votary childishness crevasse opportunism snowshoeing gibbets antedating monarchies chemotherapy's, embankment exhaustion personalize portray swills cremation's jostles preshrunken titular preterit's silversmith's okras print equable lamely sox Anglophile's accumulating causeless acacia cruciform fagged average's courthouse's shellfish's impulsiveness. " -- yields this ["stowaways carnival taxes radioactivity's Micky tearjerker toughing", "gall questionnaire's sleepwalking Aldan's Salem's game announce", "hygrometer's scriptwriter meow saleswoman sanitarium's gulf's", "somnolent kitten's lousiness's! ski zealous Diocletian's Fomalhaut's", "whacks wreaked brings craftiness temping dehumanization's votary", "childishness crevasse opportunism snowshoeing gibbets antedating", "monarchies chemotherapy's, embankment exhaustion personalize portray", "swills cremation's jostles preshrunken titular preterit's", "silversmith's okras print equable lamely sox Anglophile's accumulating", "causeless acacia cruciform fagged average's courthouse's shellfish's", "impulsiveness."]Goal: done before class on Mon 3-Oct-2011.
Goal: due one week before the exam.