Haskell: the craft of functional programming
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Harlow, Engl. ; Munich [u.a.]
Pearson Addison-Wesley
2005
|
Ausgabe: | 2. ed., [Nachdr.] |
Schriftenreihe: | International computer science series
|
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | XX, 487 S. |
ISBN: | 0201342758 9780201342758 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV022432902 | ||
003 | DE-604 | ||
005 | 20071107 | ||
007 | t | ||
008 | 070522s2005 |||| 00||| eng d | ||
020 | |a 0201342758 |9 0-201-34275-8 | ||
020 | |a 9780201342758 |9 978-0-201-34275-8 | ||
035 | |a (OCoLC)633844944 | ||
035 | |a (DE-599)BVBBV022432902 | ||
040 | |a DE-604 |b ger |e rakwb | ||
041 | 0 | |a eng | |
049 | |a DE-473 | ||
084 | |a ST 240 |0 (DE-625)143625: |2 rvk | ||
084 | |a ST 250 |0 (DE-625)143626: |2 rvk | ||
084 | |a DAT 544f |2 stub | ||
100 | 1 | |a Thompson, Simon |e Verfasser |4 aut | |
245 | 1 | 0 | |a Haskell |b the craft of functional programming |c Simon Thompson |
250 | |a 2. ed., [Nachdr.] | ||
264 | 1 | |a Harlow, Engl. ; Munich [u.a.] |b Pearson Addison-Wesley |c 2005 | |
300 | |a XX, 487 S. | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
490 | 0 | |a International computer science series | |
650 | 0 | 7 | |a HASKELL |0 (DE-588)4318275-6 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Funktionale Programmierung |0 (DE-588)4198740-8 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a HASKELL |0 (DE-588)4318275-6 |D s |
689 | 0 | 1 | |a Funktionale Programmierung |0 (DE-588)4198740-8 |D s |
689 | 0 | |8 1\p |5 DE-604 | |
689 | 1 | 0 | |a Funktionale Programmierung |0 (DE-588)4198740-8 |D s |
689 | 1 | |5 DE-604 | |
856 | 4 | 2 | |m HBZ Datenaustausch |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=015641065&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-015641065 | ||
883 | 1 | |8 1\p |a cgwrk |d 20201028 |q DE-101 |u https://d-nb.info/provenance/plan#cgwrk |
Datensatz im Suchindex
_version_ | 1804136506460209152 |
---|---|
adam_text | Titel: Haskell
Autor: Thompson, Simon
Jahr: 2005
xii
1
2
3
4
5
6
7
8
9
12
14
16
17
19
19
22
26
26
27
30
32
vii
Contents
Preface
1 Introducing functional programming
1.1 Computers and modelling
1.2 What is a function?
1.3 Pictures and functions
1.4 Types
1.5 The Haskell programming language
1.6 Expressions and evaluation
1.7 Definitions
1.8 Function definitions
1.9 Looking forward: a model of pictures
1.10 Proof
1.11 Types and functional programming
1.12 Calculation and evaluation
2 Getting started with Haskell and Hugs
2.1 A first Haskell program
2.2 Using Hugs
2.3 The standard prelude and the Haskell libraries
2.4 Modules
2.5 A second example: Pictures
2.6 Errors and error messages
3 Basic types and definitions
viii Contents
3.1 The Booleans: Bool
3.2 The integers: Int ^5
3.3 Overloading
3.4 Guards ^
3.5 The characters: Char
3.6 Floating-point numbers: Float 43
3.7 Syntax
4 Designing and writing programs 53
4.1 Where do I start? Designing a program in Haskell 53
4.2 Recursion
4.3 Primitive recursion in practice 62
4.4 General forms of recursion . 65
4.5 Program testing 67
5 Data types: tuples and lists 71
5.1 Introducing tuples, lists and strings 72
5.2 Tuple types 73
5.3 Our approach to lists 77
5.4 Lists in Haskell 78
5.5 List comprehensions 79
5.6 A library database 83
5.7 Generic functions: polymorphism 87
5.8 Haskell list functions in Prelude .hs 90
5.9 The String type 92
6 Programming with lists 96
6.1 The Picture example, revisited 96
6.2 Extended exercise: positioned pictures 100
6.3 Local definitions 103
6.4 Extended exercise: supermarket billing 108
7 Defining functions over lists 115
7.1 Pattern matching revisited 115
7.2 Lists and list patterns 117
7.3 Primitive recursion over lists 119
7.4 Finding primitive recursive definitions 120
7.5 General recursions over lists 125
7.6 Example: text processing 128
8 Reasoning about programs 135
8.1 Understanding definitions 136
8.2 Testing and proof 137
Contents ix
8.3 Definedness, termination and finiteness 138
8.4 A little logic 140
8.5 Induction 141
8.6 Further examples of proofs by induction 144
8.7 Generalizing the proof goal 148
9 Generalization: patterns of computation 152
9.1 Patterns of computation over lists 153
9.2 Higher-order functions: functions as arguments 155
9.3 Folding and primitive recursion 161
9.4 Generalizing: splitting up lists 165
10 Functions as values 167
10.1 Function-level definitions 168
10.2 Function composition 169
10.3 Functions as values and results 171
10.4 Partial application 175
10.5 Revisiting the Picture example 181
10.6 Further examples 184
10.7 Currying and uncurrying 185
10.8 Example: creating an index 186
10.9 Verification and general functions 193
11 Program development 202
11.1 The development cycle 202
11.2 Development in practice 206
12 Overloading and type classes 210
12.1 Why overloading? 211
12.2 Introducing classes 212
12.3 Signatures and instances 215
12.4 A tour of the built-in Haskell classes 220
12.5 Types and classes 225
13 Checking types 227
13.1 Monomorphic type checking 228
13.2 Polymorphic type checking 230
13.3 Type checking and classes 238
14 Algebraic types 242
14.1 Introducing algebraic types 243
14.2 Recursive algebraic types 250
14.3 Polymorphic algebraic types 257
x Contents
14.4 Case study: program errors 261
14.5 Design with algebraic data types 265
14.6 Algebraic types and type classes 269
14.7 Reasoning about algebraic types 274
15 Case study: Huffman codes 280
15.1 Modules in Haskell 280
15.2 Modular design 284
15.3 Coding and decoding 285
15.4 Implementation - I 282
15.5 Building Huffman trees 290
15.6 Design 291
15.7 Implementation - II 293
16 Abstract data types 299
16.1 Type representations 299
16.2 The Haskell abstract data type mechanism 301
16.3 Queues 304
16.4 Design 307
16.5 Simulation 309
16.6 Implementing the simulation 311
16.7 Search trees 315
16.8 Sets 321
16.9 Relations and graphs 327
16.10 Commentary 335
17 Lazy programming 337
17.1 Lazy evaluation 338
17.2 Calculation rules and lazy evaluation 340
17.3 List comprehensions revisited 344
17.4 Data-directed programming 351
17.5 Case study; parsing expressions 354
17.6 Infinite lists 354
17.7 Why infinite lists? 370
17.8 Case study; simulation 373
17.9 Proof revisited -37c
18 Programming with actions 333
18.1 Why is I/O an issue? 284
18.2 The basics of input/output oor
18.3 The do notation 287
18.4 Iteration and recursion ?Q1
18.5 The calculator
18.6 Further I/O ^8
Contents xi
18.7 The do construct revisited 400
18.8 Monads for functional programming 401
18.9 Example: monadic computation over trees 407
19 Time and space behaviour 413
19.1 Complexity of functions 414
19.2 The complexity of calculations 418
19.3 Implementations of sets 422
19.4 Space behaviour 423
19.5 Folding revisited 426
19.6 Avoiding recomputation: memoization 429
20 Conclusion 436
Appendices
A Functional, imperative and OO programming 442
B Glossary 450
C Haskell operators 457
D Understanding programs 459
E Implementations of Haskell 462
F Hugs errors 464
Bibliography 469
Index 472
|
adam_txt |
Titel: Haskell
Autor: Thompson, Simon
Jahr: 2005
xii
1
2
3
4
5
6
7
8
9
12
14
16
17
19
19
22
26
26
27
30
32
vii
Contents
Preface
1 Introducing functional programming
1.1 Computers and modelling
1.2 What is a function?
1.3 Pictures and functions
1.4 Types
1.5 The Haskell programming language
1.6 Expressions and evaluation
1.7 Definitions
1.8 Function definitions
1.9 Looking forward: a model of pictures
1.10 Proof
1.11 Types and functional programming
1.12 Calculation and evaluation
2 Getting started with Haskell and Hugs
2.1 A first Haskell program
2.2 Using Hugs
2.3 The standard prelude and the Haskell libraries
2.4 Modules
2.5 A second example: Pictures
2.6 Errors and error messages
3 Basic types and definitions
viii Contents
3.1 The Booleans: Bool
3.2 The integers: Int ^5
3.3 Overloading
3.4 Guards ^
3.5 The characters: Char
3.6 Floating-point numbers: Float 43
3.7 Syntax
4 Designing and writing programs 53
4.1 Where do I start? Designing a program in Haskell 53
4.2 Recursion
4.3 Primitive recursion in practice 62
4.4 General forms of recursion . 65
4.5 Program testing 67
5 Data types: tuples and lists 71
5.1 Introducing tuples, lists and strings 72
5.2 Tuple types 73
5.3 Our approach to lists 77
5.4 Lists in Haskell 78
5.5 List comprehensions 79
5.6 A library database 83
5.7 Generic functions: polymorphism 87
5.8 Haskell list functions in Prelude .hs 90
5.9 The String type 92
6 Programming with lists 96
6.1 The Picture example, revisited 96
6.2 Extended exercise: positioned pictures 100
6.3 Local definitions 103
6.4 Extended exercise: supermarket billing 108
7 Defining functions over lists 115
7.1 Pattern matching revisited 115
7.2 Lists and list patterns 117
7.3 Primitive recursion over lists 119
7.4 Finding primitive recursive definitions 120
7.5 General recursions over lists 125
7.6 Example: text processing 128
8 Reasoning about programs 135
8.1 Understanding definitions 136
8.2 Testing and proof 137
Contents ix
8.3 Definedness, termination and finiteness 138
8.4 A little logic 140
8.5 Induction 141
8.6 Further examples of proofs by induction 144
8.7 Generalizing the proof goal 148
9 Generalization: patterns of computation 152
9.1 Patterns of computation over lists 153
9.2 Higher-order functions: functions as arguments 155
9.3 Folding and primitive recursion 161
9.4 Generalizing: splitting up lists 165
10 Functions as values 167
10.1 Function-level definitions 168
10.2 Function composition 169
10.3 Functions as values and results 171
10.4 Partial application 175
10.5 Revisiting the Picture example 181
10.6 Further examples 184
10.7 Currying and uncurrying 185
10.8 Example: creating an index 186
10.9 Verification and general functions 193
11 Program development 202
11.1 The development cycle 202
11.2 Development in practice 206
12 Overloading and type classes 210
12.1 Why overloading? 211
12.2 Introducing classes 212
12.3 Signatures and instances 215
12.4 A tour of the built-in Haskell classes 220
12.5 Types and classes 225
13 Checking types 227
13.1 Monomorphic type checking 228
13.2 Polymorphic type checking 230
13.3 Type checking and classes 238
14 Algebraic types 242
14.1 Introducing algebraic types 243
14.2 Recursive algebraic types 250
14.3 Polymorphic algebraic types 257
x Contents
14.4 Case study: program errors 261
14.5 Design with algebraic data types 265
14.6 Algebraic types and type classes 269
14.7 Reasoning about algebraic types 274
15 Case study: Huffman codes 280
15.1 Modules in Haskell 280
15.2 Modular design 284
15.3 Coding and decoding 285
15.4 Implementation - I 282
15.5 Building Huffman trees 290
15.6 Design 291
15.7 Implementation - II 293
16 Abstract data types 299
16.1 Type representations 299
16.2 The Haskell abstract data type mechanism 301
16.3 Queues 304
16.4 Design 307
16.5 Simulation 309
16.6 Implementing the simulation 311
16.7 Search trees 315
16.8 Sets 321
16.9 Relations and graphs 327
16.10 Commentary 335
17 Lazy programming 337
17.1 Lazy evaluation 338
17.2 Calculation rules and lazy evaluation 340
17.3 List comprehensions revisited 344
17.4 Data-directed programming 351
17.5 Case study; parsing expressions 354
17.6 Infinite lists 354
17.7 Why infinite lists? 370
17.8 Case study; simulation 373
17.9 Proof revisited -37c
18 Programming with actions 333
18.1 Why is I/O an issue? 284
18.2 The basics of input/output oor
18.3 The do notation 287
18.4 Iteration and recursion ?Q1
18.5 The calculator
18.6 Further I/O ^8
Contents xi
18.7 The do construct revisited 400
18.8 Monads for functional programming 401
18.9 Example: monadic computation over trees 407
19 Time and space behaviour 413
19.1 Complexity of functions 414
19.2 The complexity of calculations 418
19.3 Implementations of sets 422
19.4 Space behaviour 423
19.5 Folding revisited 426
19.6 Avoiding recomputation: memoization 429
20 Conclusion 436
Appendices
A Functional, imperative and OO programming 442
B Glossary 450
C Haskell operators 457
D Understanding programs 459
E Implementations of Haskell 462
F Hugs errors 464
Bibliography 469
Index 472 |
any_adam_object | 1 |
any_adam_object_boolean | 1 |
author | Thompson, Simon |
author_facet | Thompson, Simon |
author_role | aut |
author_sort | Thompson, Simon |
author_variant | s t st |
building | Verbundindex |
bvnumber | BV022432902 |
classification_rvk | ST 240 ST 250 |
classification_tum | DAT 544f |
ctrlnum | (OCoLC)633844944 (DE-599)BVBBV022432902 |
discipline | Informatik |
discipline_str_mv | Informatik |
edition | 2. ed., [Nachdr.] |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01680nam a2200433 c 4500</leader><controlfield tag="001">BV022432902</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20071107 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">070522s2005 |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">0201342758</subfield><subfield code="9">0-201-34275-8</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9780201342758</subfield><subfield code="9">978-0-201-34275-8</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)633844944</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV022432902</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rakwb</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-473</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 240</subfield><subfield code="0">(DE-625)143625:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 250</subfield><subfield code="0">(DE-625)143626:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">DAT 544f</subfield><subfield code="2">stub</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Thompson, Simon</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Haskell</subfield><subfield code="b">the craft of functional programming</subfield><subfield code="c">Simon Thompson</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">2. ed., [Nachdr.]</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Harlow, Engl. ; Munich [u.a.]</subfield><subfield code="b">Pearson Addison-Wesley</subfield><subfield code="c">2005</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XX, 487 S.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">International computer science series</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">HASKELL</subfield><subfield code="0">(DE-588)4318275-6</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Funktionale Programmierung</subfield><subfield code="0">(DE-588)4198740-8</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">HASKELL</subfield><subfield code="0">(DE-588)4318275-6</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="1"><subfield code="a">Funktionale Programmierung</subfield><subfield code="0">(DE-588)4198740-8</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="8">1\p</subfield><subfield code="5">DE-604</subfield></datafield><datafield tag="689" ind1="1" ind2="0"><subfield code="a">Funktionale Programmierung</subfield><subfield code="0">(DE-588)4198740-8</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="1" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">HBZ Datenaustausch</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=015641065&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-015641065</subfield></datafield><datafield tag="883" ind1="1" ind2=" "><subfield code="8">1\p</subfield><subfield code="a">cgwrk</subfield><subfield code="d">20201028</subfield><subfield code="q">DE-101</subfield><subfield code="u">https://d-nb.info/provenance/plan#cgwrk</subfield></datafield></record></collection> |
id | DE-604.BV022432902 |
illustrated | Not Illustrated |
index_date | 2024-07-02T17:29:49Z |
indexdate | 2024-07-09T20:57:29Z |
institution | BVB |
isbn | 0201342758 9780201342758 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-015641065 |
oclc_num | 633844944 |
open_access_boolean | |
owner | DE-473 DE-BY-UBG |
owner_facet | DE-473 DE-BY-UBG |
physical | XX, 487 S. |
publishDate | 2005 |
publishDateSearch | 2005 |
publishDateSort | 2005 |
publisher | Pearson Addison-Wesley |
record_format | marc |
series2 | International computer science series |
spelling | Thompson, Simon Verfasser aut Haskell the craft of functional programming Simon Thompson 2. ed., [Nachdr.] Harlow, Engl. ; Munich [u.a.] Pearson Addison-Wesley 2005 XX, 487 S. txt rdacontent n rdamedia nc rdacarrier International computer science series HASKELL (DE-588)4318275-6 gnd rswk-swf Funktionale Programmierung (DE-588)4198740-8 gnd rswk-swf HASKELL (DE-588)4318275-6 s Funktionale Programmierung (DE-588)4198740-8 s 1\p DE-604 DE-604 HBZ Datenaustausch application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=015641065&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis 1\p cgwrk 20201028 DE-101 https://d-nb.info/provenance/plan#cgwrk |
spellingShingle | Thompson, Simon Haskell the craft of functional programming HASKELL (DE-588)4318275-6 gnd Funktionale Programmierung (DE-588)4198740-8 gnd |
subject_GND | (DE-588)4318275-6 (DE-588)4198740-8 |
title | Haskell the craft of functional programming |
title_auth | Haskell the craft of functional programming |
title_exact_search | Haskell the craft of functional programming |
title_exact_search_txtP | Haskell the craft of functional programming |
title_full | Haskell the craft of functional programming Simon Thompson |
title_fullStr | Haskell the craft of functional programming Simon Thompson |
title_full_unstemmed | Haskell the craft of functional programming Simon Thompson |
title_short | Haskell |
title_sort | haskell the craft of functional programming |
title_sub | the craft of functional programming |
topic | HASKELL (DE-588)4318275-6 gnd Funktionale Programmierung (DE-588)4198740-8 gnd |
topic_facet | HASKELL Funktionale Programmierung |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=015641065&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT thompsonsimon haskellthecraftoffunctionalprogramming |