1)datatype 'a inf_list = lcons of 'a * (unit -> 'a inf_list)
“Lf.Lx.(f x)”
“Lf.Lx.(f (f x))”
“Lf.Lx.(f (f (f x)))”
“Lf.Lx.(f (f (f (f x))))”
“Lf.Lx.(f (f (f (f (f x)))))”
…
a. Define a function church: string -> string inf_list which generates an infinite list of Church numerals starting from 1. The input to the function church is a string “x”.
b. Define a function zip: 'a inf_list * 'b inf_list -> ('a * 'b) inf_list
which takes two infinite lists, pairs up the corresponding elements, and produces an output infinite list.
2)Prolog
walkway(jarvis, furnas).
walkway(furnas, bell).
walkway(bell, studentunion).
a)Define a predicate path(B1, B2, Path) which, given two buildings B1 and B2, returns in Path the list of buildings on a path from B1 to B2 going only through permissible walkways.
b)Making use of the path predicate defined in part (a), define a predicate
pathvia(BList, B1, B2, Path), which, given two buildings B1 and B2 and a list of buildings BList, returns in Path the list of buildings on a path from B1 to B2 that goes through all buildings in BList.
Hello Sir...
I have a very good experience in functional and logic programming, ML and Prolog.
My price is negotiable Sir.
Please send me more details when possible.
I look forward to work for you Sir.
Best Regards.
I teach programming languages at a university. Two of the subjects are logic programming (Prolog) and functional programming (Haskell, ML). This task will be no problem
I currently teach several programming language courses in Prolog, Haskell, Java, etc. in a university, so can definitely do Problem 2 with no hesitation.
Used to do stuff in ML a long time ago and may be a little rusty there but still it shouldn't take me that long to complete Problem 1.
Give me a shout if you're interested.
Cheers