substitutionModel

substitutionModel - Part 1 Solution let initial x = 0 in...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 Part 1 Solution ------------------------------------------------- let initial x = 0 in let rec zardoz (f1, lst) = match lst with [] -> 3110 | h :: t -> let f x = h * List.length lst in if List.length t = 0 then f1 0 else zardoz (f, t) + f 0 in zardoz (initial, [14 ------------------------------------------------- let rec zardoz (f1, lst) = match lst with [] -> 3110 | h :: t -> let f x = h * List.length lst in if List.length t = 0 then f1 0 else zardoz (f, t) + f 0 in zardoz (fun x -> 0, [14 ------------------------------------------------- match [14 [] -> 3110 | h :: t -> let f x = h * List.length [14 if List.length t = 0 then (fun x -> 0) 0 else zardoz (f, t) + f 0 ------------------------------------------------- let f x = 14 * List.length [14 if List.length [0 else zardoz (f, [0 ------------------------------------------------- if List.length [0 else zardoz (fun x -> 14 * List.length [14 + (fun x -> 14 * List.length [14 ------------------------------------------------- zardoz (fun x -> 14 * List.length [14 + (fun x -> 14 * List.length [14 ------------------------------------------------- match [0 [] -> 3110 | h :: t -> let f x = h * List.length [0 if List.length t = 0 then (fun x -> 14 * List.length [14 else zardoz (f, t) + f 0 + (fun x -> 14 * List.length [14 ------------------------------------------------- let f x = 0 * List.length [0 if List.length [0] = 0 then (fun x -> 14 * List.length [14
Image of page 1

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

View Full Document Right Arrow Icon
Sheet1 Page 2 else zardoz (f, [0]) + f 0 + (fun x -> 14 * List.length [14 ------------------------------------------------- if List.length [0] = 0 then (fun x -> 14 * List.length [14 else zardoz (fun x -> 0 * List.length [0 + (fun x -> 14 * List.length [14 ------------------------------------------------- zardoz (fun x -> 0 * List.length [0
Image of page 2
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern