CS 330 Lecture 25 – List Comprehensions and Map
Agenda what ?s program this list comprehensions translating between list comprehensions and imperative loops map Note We start with a Program This to gel our understanding of Haskell function structure: Write function indexOf, which accepts a needle and haystack, and returns where the needle lives in the haystack. If the needle can’t be found, it […]
CS 330 Lecture 24 – Pattern Matching and List Comprehensions
Agenda what ?s functions capitalize (with guards, case, and pattern matching) tail’ nbelows contains indexOf list comprehensions how to translate TODO Bleakr’s due before April 6. Note Last time we mentioned that a primary theme of a functional language is that functions are a big deal. They can be stored in variables, they are a […]
CS 330 Lecture 23 – Functions in Haskell
Agenda what ?s what we mean by functional functions are first-class immutability expressions everywhere functions in Haskell coping with looplessness guards to case statements to pattern matching TODO Watch Erik Meijer discuss list comprehensions in both Haskell and Microsoft’s LINQ in the video below. On a 1/4 sheet, generate 3 interesting lists using Haskell’s list […]
CS 330 Lecture 22 – Haskell
Agenda what ?s exam post mortem hello, Haskell what we mean by functional Haskell examples TODO Read chapters 3 and 4 of Learn You a Haskell for Great Good! On a 1/4 sheet, answer these questions: What’s the type signature of the max function as reported by :t? What does the signature mean? When defining a function with […]
CS 330 Lecture 21 – Weak Typing in C
Agenda what ?s weak typing examples array allocation big endian is negative check for floats unions “polymorphism” in C TODO Read chapters 1 and 2 of Learn You a Haskell for a Great Good! (Use the free online version.) On a 1/4 sheet, answer these questions: What are two ways we can express the integer division of 9 […]
CS 330 Midterm
See the PDF.
CS 330 Lecture 20 – Weak Typing in C
Agenda what ?s weak typing examples array allocation big endian is negative check for floats unions “polymorphism” in C TODO The midterm exam will be during class next Wednesday. General topics we’ve covered include the shell, regular expressions, grammars, abstract syntax trees, the mechanics of assembly, and type systems through the lens of C. Exam […]
CS 330 Homework – Bleakr – due before April 6
See the PDF.
CS 330 Lecture 19 – Weak Typing in C
Agenda what ?s program this weak typing examples array allocation big endian is negative check for floats unions “polymorphism” in C TODO The midterm exam will be during class next Wednesday. General topics we’ve covered include the shell, regular expressions, grammars, abstract syntax trees, the mechanics of assembly, and type systems through the lens of […]
CS 330 Lecture 18 – Types
Agenda what ?s midterm date? the qualities of type systems explicit vs. implicit static vs. dynamic strong vs. weak casting atoi itoa weak typing examples TODO Browse the C FAQ. On a 1/4 sheet, briefly describe three questions that surprise, disturb, enlighten, or otherwise interest you. Note Let’s start with a Fill in the Blank… Types are […]