chapter2 - PROGRAMMING IN HASKELL Chapter2FirstSteps 1 The...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1 PROGRAMMING IN HASKELL Chapter 2 - First Steps
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 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: www.haskell.org/hugs
Background image of page 2
3 Starting Hugs % hugs __   __ __  __  ____   ___      _________________________________________ ||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard ||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005 ||---||         ___||           World Wide Web: http://haskell.org/hugs ||   ||                         Report bugs to: hugs-bugs@haskell.org ||   ||                         _________________________________________ > On a Unix system, Hugs can be started from the %  prompt by simply typing hugs :
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 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
Background image of page 4
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:
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/11/2011 for the course CSCE 330 taught by Professor Valtorta during the Spring '10 term at Columbia SC.

Page1 / 23

chapter2 - PROGRAMMING IN HASKELL Chapter2FirstSteps 1 The...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online