PROGRAMMING IN HASKELL
PROGRAMMING IN HASKELL
Chapter 2 - First Steps
0
The Hugs System
Hugs is an implementation of Haskell 98, and is the most widely used Haskell system;
The interactive nature of Hugs makes it well suited for teaching and prototyping purposes;
Hugs is available on the web from:
hugs
1
Starting Hugs
On a Unix system, Hugs can be started from the % prompt by simply typing hugs:
% hugs
__ __ __ __ ____ ___
|| || || || || || ||__
||___|| ||__|| ||__|| __||
||---||
___||
|| ||
|| ||
_________________________________________ Hugs 98: Based on the Haskell 98 standard Copyright (c) 1994-2005 World Wide Web: Report bugs to: hugs-bugs@ _________________________________________
>
2
The Hugs > prompt means that the Hugs system is ready to evaluate an expression.
For example:
> 2+3*4 14
> (2+3)*4 20
> sqrt (3^2 + 4^2) 5.0
3
The Standard Prelude
The library file Prelude.hs provides a large number of standard functions. In addition to the familiar numeric functions such as + and *, the library also provides many useful functions on lists.
Select the first element of a list:
> head [1,2,3,4,5] 1
4
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- csce 314 programming languages texas a m university
- programming in haskell
- haskell tutorial
- hvx disciplined convex programming and symbolic subdi
- a general introduction to functional programming using haskell
- 1 the number systems in haskell 98
- ieee visweek tutorial 2008 lexical syntax haskell
- data types computer science
- richard a eisenberg simon peyton jones
- hapy haskell for python
Related searches
- macro programming in excel
- programming in excel
- programming in java pdf
- programming in matlab
- object oriented programming in matlab
- programming in basic
- database programming in java
- database programming in python
- object oriented programming in python
- python programming in visual studio
- python programming in linux
- haskell convert int to integer