Haskell Basics
CIS
21 January 2015
194
Week
1
Suggested reading:
Learn You a Haskell for Great Good, chapter 2
Real World Haskell, chapters 1 and 2
What is Haskell?
Haskell is a lazy, functional programming language created in the late 1980s by a committe
CIS 194: Homework 5
Due Wednesday, 25 February, 2015
Preface
Setup
You will need two packages that are not part of Haskells standard
library for this assignment. They are aeson and text. You can install
these with cabal update; cabal install aeson text.1
CIS 194: Homework 2
Due Wednesday, February 4
Be sure to write functions with exactly the specied name and
type signature for each exercise (to help us test your code). You may
create additional helper functions with whatever names and type
signatures you
CIS 194: Homework 3
Due Wednesday, February 11, 2015
Interpreters
An interpreter is a program that takes another program as an input
and evaluates it. Many modern languages such as Java1 , Javascript,
Python, and PHP are interpreted. Although interpreted
Overview/important dates
For CIS 194 you will complete a final project which will tie together some of the things you have learned
and give you some practical Haskell development experience. The expectation is for you to spend
around 15-20 hours working o
CIS 194: Homework 1
Due Wednesday, January 28
When solving the homework, strive to create not just code that
works, but code that is stylish and concise. See the style guide on
the website for some general guidelines. Try to write small functions
which pe
CIS 194: Homework 8
Due Wednesday, 8 April
Propositional Logic
In this section, you will prove some theorems in Propositional Logic,
using the Haskell compiler to verify your proofs. The Curry-Howard
isomorphism states that types are equivalent to theorem
CIS 194: Homework 7
Due Wednesday, 25 March
Figure 1: The Haskell logo is modelled
after the bind function (>=) in the
Monad type class
Preliminaries
Just as Haskell Strings are not as efcient as ByteStrings, lists are
not as efcient as Vectors. Before yo
CIS 194: Homework 6
Due Wednesday, 4 March
Its all about being lazy.
Fibonacci numbers
The Fibonacci numbers Fn are dened as the sequence of integers,
beginning with 1 and 1, where every integer in the sequence is the
sum of the previous two. That is,
F0
CIS 194: Homework 4
Due Wednesday, February 18, 2015
What is a Number?
This may sound like a deep, philosophical question, but the Haskell
type system gives us a simple way to answer it. A number is any
type that has an instance of the Num type class. Let