L2Scheme - Introduction to Scheme cs784(Prasad) L2Scm 1...

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

View Full Document Right Arrow Icon
cs784(Prasad) L2Scm 1 Introduction to Scheme
Background image of page 1

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

View Full DocumentRight Arrow Icon
cs784(Prasad) L2Scm 2 Scheme Meta-language for coding interpreters “clean” semantics Scheme = LISP + ALGOL simple uniform syntax; symbols and lists block structure; static scoping statement : evaluated for its effect expression : evaluated for its value Dynamic type checking flexible but inefficient ( rapid prototyping )
Background image of page 2
cs784(Prasad) L2Scm 3 Expressions Literals Variables Procedure calls Literals numerals(2), strings(“abc”), boolean(#t), etc. Variables Identifier represents a variable. Variable reference denotes the value of its binding. x 5 ref
Background image of page 3

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

View Full DocumentRight Arrow Icon
cs784(Prasad) L2Scm 4 Expressible vs Denotable values Booleans are expressible in (early) FORTRAN, but not denotable. Functions are denotable in Pascal, but are not expressible. In (functional subset of) Scheme, both value spaces are identical. In (full) Scheme, variable references (pointers) are denotable but not expressible.
Background image of page 4
cs784(Prasad) L2Scm 5 Scheme Identifiers E.g., y,x5,+,two+two,zero?, etc (Illegal) 5x,y)2,ab c, etc Identifiers reserved keywords variables pre-defined functions/constants ordinary functions = procedures
Background image of page 5

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

View Full DocumentRight Arrow Icon
L2Scm 6 Procedure Call (application) (operator-expr operand-expr . ..) prefix expression (proc/op arg1 arg2 arg3 . ..) Order of evaluation of the sub-expressions is “explicitly” left unspecified by Scheme. cf. C is silent about it.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/02/2011 for the course CS cs784 taught by Professor Tkprasad during the Spring '11 term at New York Institute of Technology-Westbury.

Page1 / 30

L2Scheme - Introduction to Scheme cs784(Prasad) L2Scm 1...

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

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