logo CodeStepByStep logo

value_mystery4

Language/Type: ML value mystery
Author: Dan Grossman (added by Melissa Hovik on 2018/01/19)

Give the value ans is bound to after evaluation.

fun f p =
    let
        val x = 3
        val y = 4
        val (z,w) = p
    in
        (z (w y)) + x
    end
val x = 1
val y = 2
val ans = f((fn z => x + z), (fn x => x + x))
ans =

You must log in before you can solve this problem.

Log In

Need help?

If you do not understand how to solve an exercise or why your solution doesn't work, please contact your TA or instructor.
If something seems wrong with the site (errors, slow performance, incorrect tests, etc.), please

Is there a problem? Contact a site administrator.

©, all rights reserved.