quiz3-example-fall11

quiz3-example-fall11 - CMSC330 Fall 2011 Example Quiz#3...

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

View Full Document Right Arrow Icon
Name Discussion Time (circle one): 10am 11am 12pm 1pm 2pm 3pm Do not start this exam until you are told to do so! Instructions You have 25 minutes for this quiz. This is a closed book exam. No notes or other aids are allowed. Answer essay questions concisely using 2-3 sentences. Longer answers are not necessary and a penalty may be applied. For partial credit, show all of your work and clearly indicate your answers. Write neatly. Credit cannot be given for illegible answers. 1. (16 pts) OCaml Types and Type Inference a. (2 pts each) Give the type of the following OCaml expressions i. [ (“1”, 2) ; (“3”, 4) ] Type = ii. fun f a -> [a ; a+1] Type = b. (3 pts each) Write an OCaml expression with the following type i. int * int list Code = ii. int list -> (int -> int) Code = c. (3 pts each) Give the value of the following OCaml expressions. If an error exists, describe the error. i.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/13/2012 for the course CMSC 330 taught by Professor Staff during the Fall '08 term at Maryland.

Page1 / 3

quiz3-example-fall11 - CMSC330 Fall 2011 Example Quiz#3...

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

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