Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Arguments - Building Programming Experience - Lecture Slides, Slides of Computer Programming

Some concept of Building Programming Experience are Trees, Square Limit Language, Special Forms, Quizanssheet, Professor Abstraction, Compound Procedure, Procedures And Recursion. Main points of this lecture are: Arguments, Arguments, Returning False, Last Argument, Arguments, Evaluate, Trueishly, Stopping, Evaluates, Higher Order Procedures

Typology: Slides

2012/2013

Uploaded on 04/25/2013

lathika
lathika 🇮🇳

4

(12)

178 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Scheme
1. Special Forms
(a) and -(and arg1 arg2 ...)
Evaluates arguments from left to right, stopping at the first one that evaluates to false
and returning false. Should all the arguments evaluate true-ishly, returns the value of
the last argument.
(b) or -(or arg1 arg2 ...)
Evaluates arguments from left to right, stopping at the first one that evaluates to true-ish
and returns that value. Should all the arguments evaluate to false, returns false.
Higher Order Procedures
(define sum
(lambda (f x y dx)
Docsity.com
pf2

Partial preview of the text

Download Arguments - Building Programming Experience - Lecture Slides and more Slides Computer Programming in PDF only on Docsity!

Scheme

  1. Special Forms

(a) and Evaluates arguments from left to right, stopping at the first one that evaluates to false (and arg1 arg2 ...)

and returning false.the last argument. Should all the arguments evaluate trueishly, returns the value of

(b) or (or arg1 arg2 ...)

Evaluates arguments from left to right, stopping at the first one that evaluates to trueishand returns that value. Should all the arguments evaluate to false, returns false.

Higher Order Procedures

(define sum(lambda (f x y dx)

Docsity.com

Types

Problems

For each expression, write the type of the value that results from evaluating the expression. Ignore define expressions. 4 (+ 1 1) (lambda (x) (+ x 1)) (lambda (x) (= x 1)) (define square (lambda (x) (* x x))) square (square 5) (define a (lambda (f) (+ (f 5) 1))) a (a square) (define b (lambda (x y)(+ (a x) y)))

b (b square 4) (define c(lambda (x) (lambda (y)(+ x y))))

c (c 5)

Docsity.com