



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Exam; Professor: Leavens; Class: Programming Languages I; Subject: Computer Programming; University: University of Central Florida; Term: Spring 2008;
Typology: Exams
1 / 5
This page cannot be seen from the preview
Don't miss anything!




For Grading
M = proc {$ Ls F G ?R} case Ls of cons(hd: H tl: T) then local FRes in {F H FRes} local TailRes in R = cons(hd: FRes tl: TailRes) {M T F N TailRes} end end else R = nil end end
public int run( int x, int y) { q = x+3; return q; }
local Sum Total in Total = 0 fun {Sum Ls} case Ls of nil then Total [] H|T then Total=Total+H {Sum T} end end {Show {Sum 1|2|3|nil}} end
local P Unk W in P = person(height: 62 weight: 190 age: Unk) W = 55 case P of building(height: H weight: W age: A) then {Browse first#H#W#A} [] person(height: H weight: 190) then {Browse second#H} [] person(height: H weight: W age: A) then {Browse third#H#W#A} [] person(height: H weight: X age: A) then {Browse fourth#H#X#A} else {Browse none} end end