Writing Functions in Scheme. Writing Functions in Scheme. Checking My Answer: Empty List. Checking My Answer: Empty List
|
|
|
- Britton Gibbs
- 10 years ago
- Views:
Transcription
1 Writing Functions in Scheme Writing Functions in Scheme Suppose we want a function ct which takes a list of symbols and returns the number of symbols in the list (ct (a b c)) 3 (ct ()) 0 (ct (x y z w t)) 5 How can we write this function? Answer #1: Have the instructor write it ;; ct : <list-of-sym> -> <num> ;; (ct ()) 0 ;; (ct (a b c)) 3 [else (ct (cdr l)))])) Checking My Answer: Empty List Checking My Answer: Empty List [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) (ct ()) [(null? ()) 0] [else (ct (cdr ())))]) [(null? ()) 0] [else (ct (cdr ())))]) [#t 0] [else (ct (cdr ())))]) 1-4
2 Checking My Answer: Empty List [else (ct (cdr l)))])) [#t 0] [else (ct (cdr ())))]) [else (ct (cdr l)))])) 0 [else (ct (cdr l)))])) (ct (a b c)) [else (ct (cdr l)))])) [(null? (a b c)) 0] [else (ct (cdr (a b c))))]) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [(null? (a b c)) 0] [else (ct (cdr (a b c))))]) [else (ct (cdr (a b c))))]) [else (ct (cdr (a b c))))]) (ct (cdr (a b c)))) 5-8
3 [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) (ct (cdr (a b c)))) (ct (b c))) (ct (b c))) [(null? (b c)) 0] [else (ct (cdr (b c))))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [(null? (b c)) 0] [else (ct (cdr (b c))))])) [else (ct (cdr (b c))))])) [else (ct (cdr (b c))))])) (ct (cdr (b c))))) 9-12
4 [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) (ct (cdr (b c))))) (ct (c)))) (ct (c)))) [(null? (c)) 0] [else (ct (cdr (c))))]))) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [(null? (c)) 0] [else (ct (cdr (c))))]))) [else (ct (cdr (c))))]))) [else (ct (cdr (c))))]))) (ct (cdr (c)))))) 13-16
5 [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) (ct (cdr (c)))))) (ct ())))) (ct ())))) [(null? ()) 0] [else (ct (cdr ())))])))) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [(null? ()) 0] [else (ct (cdr ())))])))) [#t 0] [else (ct (cdr ())))])))) [#t 0] [else (ct (cdr ())))])))) 0))) 17-20
6 [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) [else (ct (cdr l)))])) 0))) 1)) 1)) 2) Writing Functions in Scheme: Answer #2 [else (ct (cdr l)))])) 2) [else (ct (cdr l)))])) 3 Answer #2: Use the general design recipe Locate or write a Write a contract Write examples Create a template that follows the shape of the Convert the template to the final function Run examples as tests 21-25
7 Writing Functions in Scheme: Answer #2 Data Definitions Answer #2: Use the general design recipe Locate or write a Write a contract Write examples Create a template that follows the shape of the Convert the template to the final function What is a "list of symbols"? Sometimes the is given, somtimes you have to create it Usually include it in your code as a comment Run examples as tests works 90% of the time Contracts Examples A contract is a comment that identifies set of input values and output values Examples (usually in comments at first) help clarify the purpose of the function ;; ct: <list-of-sym> -> <num> All mentioned data sets should have a somewhere ;; (ct ()) 0 ;; (ct (a b c)) 3 Make sure that every case in the is covered at least once 26-34
8 Template Template Two cases in implies cond with two cond-lines Template Template Corresponding predicate for each data case Extract parts in cases with meta-variables 35-38
9 Template Template Recursive call for self-references in A template depends only on the input data; it ignores the function s purpose (Nevertheless, generating a template, which is fairly automatic, usually provides most of the function) Template to Function Template to Function Transform template to function line-by-line Transform template to function line-by-line 39-43
10 Template to Function Reminder: Recipe Transform template to function line-by-line [(pair? l) (ct (cdr l)) )])) Sometimes, a part of the template isn t needed Locate or write a Write a contract Write examples Create a template that follows the shape of the Convert the template to the final function Run examples as tests Reminder: Template Steps More Examples Create a cond expression with one line for each case in the Write down a predicate for each case For the answer, extract parts in cases with meta-variables For each self-reference in the, add a recursive call (more examples in class) Shape of template shape == Shape of 44-47
11 Generalized Recipe Locate or write s Write contracts Write examples Create a template that follows the shape of the data definition, one for each Convert the templates to the final functions Run examples as tests 48-49
Party Time! Computer Science I. Signature Examples PAIR OBJ. The Signature of a Procedure. Building a Set. Testing for Membership in a Set
Computer Science I Professor Tom Ellman Lecture 21 Party Time! Whom shall you invite? We will write the Party Planner program. It will select SETS of guests. By reasoning with RELATIONS. Before we party,
Hadoop and Map-reduce computing
Hadoop and Map-reduce computing 1 Introduction This activity contains a great deal of background information and detailed instructions so that you can refer to it later for further activities and homework.
Programming Languages CIS 443
Course Objectives Programming Languages CIS 443 0.1 Lexical analysis Syntax Semantics Functional programming Variable lifetime and scoping Parameter passing Object-oriented programming Continuations Exception
Output: 12 18 30 72 90 87. struct treenode{ int data; struct treenode *left, *right; } struct treenode *tree_ptr;
50 20 70 10 30 69 90 14 35 68 85 98 16 22 60 34 (c) Execute the algorithm shown below using the tree shown above. Show the exact output produced by the algorithm. Assume that the initial call is: prob3(root)
How To Program In Scheme (Prolog)
The current topic: Scheme! Introduction! Object-oriented programming: Python Functional programming: Scheme! Introduction Next up: Numeric operators, REPL, quotes, functions, conditionals Types and values
Roman Numerals Case Study 1996 M. J. Clancy and M. C. Linn
Roman Numerals Case Study 1996 M. J. Clancy and M. C. Linn Background Values less than 3999 in the Roman numeral system are written using seven digits whose decimal equivalents are given in the table below.
CSE 135: Introduction to Theory of Computation Decidability and Recognizability
CSE 135: Introduction to Theory of Computation Decidability and Recognizability Sungjin Im University of California, Merced 04-28, 30-2014 High-Level Descriptions of Computation Instead of giving a Turing
Chapter 2: Elements of Java
Chapter 2: Elements of Java Basic components of a Java program Primitive data types Arithmetic expressions Type casting. The String type (introduction) Basic I/O statements Importing packages. 1 Introduction
Chapter 15 Functional Programming Languages
Chapter 15 Functional Programming Languages Introduction - The design of the imperative languages is based directly on the von Neumann architecture Efficiency (at least at first) is the primary concern,
3. Mathematical Induction
3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)
Two's Complement Adder/Subtractor Lab L03
Two's Complement Adder/Subtractor Lab L03 Introduction Computers are usually designed to perform indirect subtraction instead of direct subtraction. Adding -B to A is equivalent to subtracting B from A,
Chapter 7 Uncomputability
Chapter 7 Uncomputability 190 7.1 Introduction Undecidability of concrete problems. First undecidable problem obtained by diagonalisation. Other undecidable problems obtained by means of the reduction
Why should I back up my certificate? How do I create a backup copy of my certificate?
Why should I back up my certificate? You should always keep a backup copy of your ACES Business Certificate on a location external to your computer. Since it s stored locally on your computer, in the Windows
The Correlation Coefficient
The Correlation Coefficient Lelys Bravo de Guenni April 22nd, 2015 Outline The Correlation coefficient Positive Correlation Negative Correlation Properties of the Correlation Coefficient Non-linear association
ACCESS 2007. Importing and Exporting Data Files. Information Technology. MS Access 2007 Users Guide. IT Training & Development (818) 677-1700
Information Technology MS Access 2007 Users Guide ACCESS 2007 Importing and Exporting Data Files IT Training & Development (818) 677-1700 [email protected] TABLE OF CONTENTS Introduction... 1 Import Excel
Unit 11 Fractions and decimals
Unit 11 Fractions and decimals Five daily lessons Year 4 Spring term (Key objectives in bold) Unit Objectives Year 4 Use fraction notation. Recognise simple fractions that are Page several parts of a whole;
Basic Lisp Operations
Basic Lisp Operations BLO-1 Function invocation It is an S-expression just another list! ( function arg1 arg2... argn) First list item is the function prefix notation The other list items are the arguments
Functional Programming. Functional Programming Languages. Chapter 14. Introduction
Functional Programming Languages Chapter 14 Introduction Functional programming paradigm History Features and concepts Examples: Lisp ML 1 2 Functional Programming Functional Programming Languages The
(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.
3130CIT: Theory of Computation Turing machines and undecidability (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. An undecidable problem
Regression Verification: Status Report
Regression Verification: Status Report Presentation by Dennis Felsing within the Projektgruppe Formale Methoden der Softwareentwicklung 2013-12-11 1/22 Introduction How to prevent regressions in software
Transformer circuit calculations
Transformer circuit calculations This worksheet and all related files are licensed under the Creative Commons Attribution License, version 1.0. To view a copy of this license, visit http://creativecommons.org/licenses/by/1.0/,
Masters programmes in Computer Science and Information Systems. Object-Oriented Design and Programming. Sample module entry test xxth December 2013
Masters programmes in Computer Science and Information Systems Object-Oriented Design and Programming Sample module entry test xxth December 2013 This sample paper has more questions than the real paper
ERP guide and questions
Scandiweb ERP guide and questions Sometimes client asks you a short questions - how much would cost integration of customers ERP? And sometimes they provide some data on objects to be imported e.g. products,
Reading 13 : Finite State Automata and Regular Expressions
CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model
Why do you want to launch a business analyst career? Some possibilities include:
YOUR BUSINESS ANALYSIS CAREER GOALS WHY BUSINESS ANALYSIS? Why do you want to launch a business analyst career? Some possibilities include: Enjoy my work more; Leverage my skills as part of a profession;
SAS Comments How Straightforward Are They? Jacksen Lou, Merck & Co.,, Blue Bell, PA 19422
SAS Comments How Straightforward Are They? Jacksen Lou, Merck & Co.,, Blue Bell, PA 19422 ABSTRACT SAS comment statements typically use conventional symbols, *, %*, /* */. Most programmers regard SAS commenting
5.4 Solving Percent Problems Using the Percent Equation
5. Solving Percent Problems Using the Percent Equation In this section we will develop and use a more algebraic equation approach to solving percent equations. Recall the percent proportion from the last
2. Abstract State Machines
2. Abstract State Machines The notion of Abstract State Machines (ASMs), defined in [20], captures in mathematically rigorous yet transparent form some fundamental operational intuitions of computing,
Database Security. The Need for Database Security
Database Security Public domain NASA image L-1957-00989 of people working with an IBM type 704 electronic data processing machine. 1 The Need for Database Security Because databases play such an important
It has a parameter list Account(String n, double b) in the creation of an instance of this class.
Lecture 10 Private Variables Let us start with some code for a class: String name; double balance; // end Account // end class Account The class we are building here will be a template for an account at
CS 1133, LAB 2: FUNCTIONS AND TESTING http://www.cs.cornell.edu/courses/cs1133/2015fa/labs/lab02.pdf
CS 1133, LAB 2: FUNCTIONS AND TESTING http://www.cs.cornell.edu/courses/cs1133/2015fa/labs/lab02.pdf First Name: Last Name: NetID: The purpose of this lab is to help you to better understand functions:
The essential guide to automatic enrolment
Information for employers The essential guide to automatic enrolment The law on workplace pensions has changed. Under the Pensions Act 2008, every employer in the UK must put certain staff into a pension
Data Integration through XML/XSLT. Presenter: Xin Gu
Data Integration through XML/XSLT Presenter: Xin Gu q7.jar op.xsl goalmodel.q7 goalmodel.xml q7.xsl help, hurt GUI +, -, ++, -- goalmodel.op.xml merge.xsl goalmodel.input.xml profile.xml Goal model configurator
WRITING PROOFS. Christopher Heil Georgia Institute of Technology
WRITING PROOFS Christopher Heil Georgia Institute of Technology A theorem is just a statement of fact A proof of the theorem is a logical explanation of why the theorem is true Many theorems have this
Describing Relationships between Two Variables
Describing Relationships between Two Variables Up until now, we have dealt, for the most part, with just one variable at a time. This variable, when measured on many different subjects or objects, took
UNIVERSITY OF CALIFORNIA College of Engineering Department of Electrical Engineering and Computer Sciences
UNIVERSITY OF CALIFORNIA College of Engineering Department of Electrical Engineering and Computer Sciences Jan M. Rabaey Homework #2 EECS 141 Due Friday, February 6, 5pm, box in 240 Cory 1. Suppose you
COLLEGE ALGEBRA 10 TH EDITION LIAL HORNSBY SCHNEIDER 1.1-1
10 TH EDITION COLLEGE ALGEBRA LIAL HORNSBY SCHNEIDER 1.1-1 1.1 Linear Equations Basic Terminology of Equations Solving Linear Equations Identities 1.1-2 Equations An equation is a statement that two expressions
Section IV.1: Recursive Algorithms and Recursion Trees
Section IV.1: Recursive Algorithms and Recursion Trees Definition IV.1.1: A recursive algorithm is an algorithm that solves a problem by (1) reducing it to an instance of the same problem with smaller
NEW TECHNIQUE TO DEAL WITH DYNAMIC DATA MINING IN THE DATABASE
www.arpapress.com/volumes/vol13issue3/ijrras_13_3_18.pdf NEW TECHNIQUE TO DEAL WITH DYNAMIC DATA MINING IN THE DATABASE Hebah H. O. Nasereddin Middle East University, P.O. Box: 144378, Code 11814, Amman-Jordan
Computational Models Lecture 8, Spring 2009
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown Univ. p. 1 Computational Models Lecture 8, Spring 2009 Encoding of TMs Universal Turing Machines The Halting/Acceptance
Programming Project 1: Lexical Analyzer (Scanner)
CS 331 Compilers Fall 2015 Programming Project 1: Lexical Analyzer (Scanner) Prof. Szajda Due Tuesday, September 15, 11:59:59 pm 1 Overview of the Programming Project Programming projects I IV will direct
Calculate Highest Common Factors(HCFs) & Least Common Multiples(LCMs) NA1
Calculate Highest Common Factors(HCFs) & Least Common Multiples(LCMs) NA1 What are the multiples of 5? The multiples are in the five times table What are the factors of 90? Each of these is a pair of factors.
Questions 1 through 25 are worth 2 points each. Choose one best answer for each.
Questions 1 through 25 are worth 2 points each. Choose one best answer for each. 1. For the singly linked list implementation of the queue, where are the enqueues and dequeues performed? c a. Enqueue in
This lecture. Abstract data types Stacks Queues. ADTs, Stacks, Queues 1. 2004 Goodrich, Tamassia
This lecture Abstract data types Stacks Queues ADTs, Stacks, Queues 1 Abstract Data Types (ADTs) An abstract data type (ADT) is an abstraction of a data structure An ADT specifies: Data stored Operations
Certification Authorities Software Team (CAST) Position Paper CAST-13
Certification Authorities Software Team (CAST) Position Paper CAST-13 Automatic Code Generation Tools Development Assurance Completed June 2002 NOTE: This position paper has been coordinated among the
8 Primes and Modular Arithmetic
8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.
Understanding Sql Injection
Understanding Sql Injection Hardik Shah Understanding SQL Injection Introduction: SQL injection is a technique used by a malicious user to gain illegal access on the remote machines through the web applications
COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing
COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing The scanner (or lexical analyzer) of a compiler processes the source program, recognizing
LogProcess v1.0 User Guide
LogProcess v1.0 Index Pages Subject Introduction 3 What is LogProcess? Installation & Configuration 4 System requirements 4-5 Installing the utility 6 Configuring LogProcess 7 Configuring IIS 8 Scheduling
A binary search tree or BST is a binary tree that is either empty or in which the data element of each node has a key, and:
Binary Search Trees 1 The general binary tree shown in the previous chapter is not terribly useful in practice. The chief use of binary trees is for providing rapid access to data (indexing, if you will)
TEMPLATES FOR PROGRESSIVE PAIRING LADDER
FEDERATION DE TEMPLATES FOR PROGRESSIVE PAIRING LADDER Elimination ladder - Progressive-ladder Car Field 4 Car Field 1 1 4 2 2 5 Car Field 6 Car Field 7 Car Field 8 Car Field 1 1 1 1 6 8 4 4 4 5 5 2 2
TinyUrl (v1.2) 1. Description. 2. Configuration. 2.1. Commands
1. Description The TinyUrl plugin provides two main functions: Converts urls to tinyurls Displays the page title of the requested URL When the!tinyurl command is entered, it takes the last url seen in
How To Develop An Application
What is Application Lifecycle Management? David Chappell Sponsored by Microsoft Corporation Copyright 2014 Chappell & Associates Defining application lifecycle management (ALM) isn t easy. Different people
This can dilute the significance of a departure from the null hypothesis. We can focus the test on departures of a particular form.
One-Degree-of-Freedom Tests Test for group occasion interactions has (number of groups 1) number of occasions 1) degrees of freedom. This can dilute the significance of a departure from the null hypothesis.
Principles of Data Visualization
Principles of Data Visualization by James Bernhard Spring 2012 We begin with some basic ideas about data visualization from Edward Tufte (The Visual Display of Quantitative Information (2nd ed.)) He gives
Dynamic Programming Problem Set Partial Solution CMPSC 465
Dynamic Programming Problem Set Partial Solution CMPSC 465 I ve annotated this document with partial solutions to problems written more like a test solution. (I remind you again, though, that a formal
Molecular Dynamics Simulations with Applications in Soft Matter Handout 7 Memory Diagram of a Struct
Dr. Martin O. Steinhauser University of Basel Graduate Lecture Spring Semester 2014 Molecular Dynamics Simulations with Applications in Soft Matter Handout 7 Memory Diagram of a Struct Friday, 7 th March
CS558. Network Security. Boston University, Computer Science. Midterm Spring 2014.
CS558. Network Security. Boston University, Computer Science. Midterm Spring 2014. Instructor: Sharon Goldberg March 25, 2014. 9:30-10:50 AM. One-sided handwritten aid sheet allowed. No cell phone or calculators
Life Insurance Modelling: Notes for teachers. Overview
Life Insurance Modelling: Notes for teachers In this mathematics activity, students model the following situation: An investment fund is set up Investors pay a set amount at the beginning of 20 years.
2. Capitalize initial keyword In the example above, READ and WRITE are in caps. There are just a few keywords we will use:
Pseudocode: An Introduction Flowcharts were the first design tool to be widely used, but unfortunately they do t very well reflect some of the concepts of structured programming. Pseudocode, on the other
We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share.
LING115 Lecture Note Session #4 Python (1) 1. Introduction As we have seen in previous sessions, we can use Linux shell commands to do simple text processing. We now know, for example, how to count words.
FIPA Agent Management Specification
FOUNDATION FOR INTELLIGENT PHYSICAL AGENTS FIPA Agent Management Specification Document title FIPA Agent Management Specification Document number XC00023G Document source FIPA Agent Management Document
Authentication and Encryption: How to order them? Motivation
Authentication and Encryption: How to order them? Debdeep Muhopadhyay IIT Kharagpur Motivation Wide spread use of internet requires establishment of a secure channel. Typical implementations operate in
A Guide to Process Mapping
A Guide to Process Mapping Process mapping helps represent work processes visually and identify problem areas and opportunities for process improvement. It provides a common understanding of the entire
Compound Data in Java. Instances of Compound Data Types. Armadillos. Design: Functional to Object-Oriented. Beginner Scheme:
Compound Data in Java Design: Functional to Object-Oriented Semantics of Local Definitions Beginner Scheme: ; A snake is ; (make-snake sym num sym) (define-struct snake (name weight food)) Beginner Java:
ASCII Encoding. The char Type. Manipulating Characters. Manipulating Characters
The char Type ASCII Encoding The C char type stores small integers. It is usually 8 bits. char variables guaranteed to be able to hold integers 0.. +127. char variables mostly used to store characters
General instructions for the content of all StatTools assignments and the use of StatTools:
General instructions for the content of all StatTools assignments and the use of StatTools: An important part of Business Management 330 is learning how to conduct statistical analyses and to write text
Assignment Kits. Summary Kit Contents Lecture 1: Kit cover sheet (page 40)
Assignment Kits These assignment kits contain the forms students need to do the assignments in the textbook A Discipline for Software Engineering by Watts S. Humphrey. In using them: - Provide each student
VFComb 1.3 the program which simplifies the virtual font management
A.S. Berdnikov Institute of Analytical Instrumentation Rizsky pr. 26, 198103 St.Petersburg, Russia [email protected] S.B. Turtia Institute of Analytical Instrumentation Rizsky pr. 26, 198103 St.Petersburg,
Chapter 5. Selection 5-1
Chapter 5 Selection 5-1 Selection (Decision) The second control logic structure is selection: Selection Choosing between two or more alternative actions. Selection statements alter the sequential flow
Chapter 7: Functional Programming Languages
Chapter 7: Functional Programming Languages Aarne Ranta Slides for the book Implementing Programming Languages. An Introduction to Compilers and Interpreters, College Publications, 2012. Fun: a language
Basic Set Theory. 1. Motivation. Fido Sue. Fred Aristotle Bob. LX 502 - Semantics I September 11, 2008
Basic Set Theory LX 502 - Semantics I September 11, 2008 1. Motivation When you start reading these notes, the first thing you should be asking yourselves is What is Set Theory and why is it relevant?
A GUIDE TO STARTING UP AS A SOLE TRADER/SELF EMPLOYED
A GUIDE TO STARTING UP AS A SOLE TRADER/SELF EMPLOYED RIFTACCOUNTING.COM A GUIDE TO STARTING UP AS A SOLE TRADER/ SELF EMPLOYED This guide assumes that you have made a decision to become a Sole Trader
Objectives After completion of study of this unit you should be able to:
Data Flow Diagram Tutorial Objectives After completion of study of this unit you should be able to: Describe the use of data flow diagrams Produce a data flow diagram from a given case study including
Contents. Pentaho Corporation. Version 5.1. Copyright Page. New Features in Pentaho Data Integration 5.1. PDI Version 5.1 Minor Functionality Changes
Contents Pentaho Corporation Version 5.1 Copyright Page New Features in Pentaho Data Integration 5.1 PDI Version 5.1 Minor Functionality Changes Legal Notices https://help.pentaho.com/template:pentaho/controls/pdftocfooter
How To Understand The Theory Of Computer Science
Theory of Computation Lecture Notes Abhijat Vichare August 2005 Contents 1 Introduction 2 What is Computation? 3 The λ Calculus 3.1 Conversions: 3.2 The calculus in use 3.3 Few Important Theorems 3.4 Worked
MAX = 5 Current = 0 'This will declare an array with 5 elements. Inserting a Value onto the Stack (Push) -----------------------------------------
=============================================================================================================================== DATA STRUCTURE PSEUDO-CODE EXAMPLES (c) Mubashir N. Mir - www.mubashirnabi.com
IBI Group FTP: Usage Instructions
IBI Group FTP: Usage Instructions Version: Windows; Last Updated: April 22 nd 2009 There are two IBI Group supported methods for connecting to the FTP site, My Computer and FileZilla Client Software. If
Test Driven Development
Test Driven Development Introduction Test Driven development (TDD) is a fairly recent (post 2000) design approach that originated from the Extreme Programming / Agile Methodologies design communities.
STUDY PLUS MATHS ON THE FARM LESSON 1
STUDY PLUS MATHS ON THE FARM LESSON 1 Key word Lesson Starter Main Activity Plenary Resources Convert between units of area Acre hectare square metre square feet Setting the scene photo-story of Arrallas
Chapter 6. Data-Flow Diagrams
Chapter 6. Data-Flow Diagrams Table of Contents Objectives... 1 Introduction to data-flow diagrams... 2 What are data-flow diagrams?... 2 An example data-flow diagram... 2 The benefits of data-flow diagrams...
Outline. Computer Science 331. Stack ADT. Definition of a Stack ADT. Stacks. Parenthesis Matching. Mike Jacobson
Outline Computer Science 1 Stacks Mike Jacobson Department of Computer Science University of Calgary Lecture #12 1 2 Applications Array-Based Linked List-Based 4 Additional Information Mike Jacobson (University
Modern Systems Analysis and Design
Modern Systems Analysis and Design Prof. David Gadish Structuring System Data Requirements Learning Objectives Concisely define each of the following key data modeling terms: entity type, attribute, multivalued
Calculating interest rates
Calculating interest rates A reading prepared by Pamela Peterson Drake O U T L I N E 1. Introduction 2. Annual percentage rate 3. Effective annual rate 1. Introduction The basis of the time value of money
CS1102: Adding Error Checking to Macros
CS1102: Adding Error Checking to Macros Kathi Fisler, WPI October 6, 2008 1 Typos in State Machines The point of creating macros for state machines is to hide language details from the programmer. Ideally,
7 Relations and Functions
7 Relations and Functions In this section, we introduce the concept of relations and functions. Relations A relation R from a set A to a set B is a set of ordered pairs (a, b), where a is a member of A,
Apple Certificate Library Functional Specification
Apple Certificate Library Functional Specification apple 2005-01-13 apple Apple Computer, Inc. 2005 Apple Computer, Inc. All rights reserved. No part of this publication may be reproduced, stored in a
Basic Concepts of Set Theory, Functions and Relations
March 1, 2006 p. 1 Basic Concepts of Set Theory, Functions and Relations 1. Basic Concepts of Set Theory...1 1.1. Sets and elements...1 1.2. Specification of sets...2 1.3. Identity and cardinality...3
