Read e-book online Programming with Miranda PDF

By Chris Clack; Colin Myers; Ellen Poon

ISBN-10: 013192592X

ISBN-13: 9780131925922

Show description

Read Online or Download Programming with Miranda PDF

Similar systems analysis & design books

Get Practical Guide to Enterprise Architecture, A PDF

In a realistic advisor to company structure, six major specialists current necessary technical, approach, and enterprise perception into each point of company structure. you will discover start-to-finish counsel for architecting potent procedure, software program, and service-oriented architectures; utilizing product traces to streamline company software program layout; leveraging strong agile modeling strategies; extending the Unified approach to the total software program lifecycle; architecting presentation degrees and consumer adventure; and using the technical path of the total firm.

Get Project Management for Information Systems (5th Edition) PDF

Cadle and Yeates' venture administration for info platforms is acceptable for undergraduate scholars learning undertaking administration in the IT atmosphere. This accomplished and functional booklet is a wonderful place to begin for any scholars of venture administration for info structures, whether or not they are from a computing or a company historical past, at undergraduate or masters point.

Crystal Reports 2008 Official Guide by Neil Fitzgerald PDF

CRYSTAL stories® 2008 professional consultant no matter if you’re a DBA, information warehousing or company intelligence specialist, reporting expert, or developer, this publication has the solutions you wish. via hands-on examples, you’ll systematically grasp Crystal stories and Xcelsius 2008’s strongest positive aspects for developing, allotting, and offering content material.

Additional info for Programming with Miranda

Example text

3. It is assumed that the argument c will be a character in the range ’a’ to ’z’. 2 Function application The function twice can be applied to an actual value, in exactly the same manner as system-defined functions: Miranda twice 3 6 Here, the formal parameter x has obtained the actual value 3. 38 Functions The integer value returned by the above application may also be used as the actual parameter for another function application. There is no restriction on the number of the times this principle may be employed, as long as the types match.

The associated function body is then evaluated. At its simplest, a function will have only one pattern. Since a formal parameter is an instance of a pattern, all the function definitions so far presented are also examples of this form. The following implementation of the function not (the equivalent of the built-in function ~ — which inverts the truth value of its parameter) demonstrates a simple use of pattern matching: not True = False not False = True Similarly: solomonGrundy "Monday" solomonGrundy "Sunday" solomonGrundy anyday = "Born" = "Buried" = "Did something else" In this example, the anyday pattern will match any other input and will therefore act as a default case.

The reader is referred to (Gordon, 1979) and (Thompson, 1991) for more details. The collection of values that a type can have is known as its domain. For example, the domain of type bool is the collection of built-in values True and False. 6 During evaluation, it is possible for an error to occur: either an error message will be produced, or the program will enter an infinite loop. The formal treatment of type domains treats such an error as a valid (“undefined”) result and a special “Error” value (representing both kinds of error) is added to the domain of every type.

Download PDF sample

Programming with Miranda by Chris Clack; Colin Myers; Ellen Poon


by Charles
4.4

Rated 4.11 of 5 – based on 40 votes