
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
Information about quiz 17 for the csce 330 fall 2007 course, which covers ml (metalanguage) statements and functions. Students are required to determine if a given ml statement is an expression or a command, and whether it will result in an exception. Additionally, they are asked to write an ml function that adds 1 to all elements of a non-empty integer list using patterns.
Typology: Quizzes
1 / 1
This page cannot be seen from the preview
Don't miss anything!

(a) Is the above ML statement an expression or a command? (Choose one). Answer: an expression (b) Will the above ML statement result in an exception? Answer: no (c) If not, what will the result be? Answer: 7
fun ad1xs [x] = [x+1] | ad1xs (x::xs) = (x+1) :: ad1xs (xs);