Discrete Mathematics Using a Computer

By John O’Donnell, Cordelia Hall and Rex Page

 

 Running Haskell:

Create a file with a name like mydefs.hs

The extension hs stands for Haskell script.

Store two lines in your file:

y=x+1

x=2*3

Run GHCi or Hugs

> :load mydefs

>x

6

>y

7

>x*y

42

> 

 

Link to the website

Back to Home