This means you need to build the "nano/" project. Run 'make' from "nano/".
Your types should be polymorphic until used. For example, fun x -> x and has the type arrow(V,V), where V is a type variable. You do not need to handle polymorphism in general. For example, you should handle let id = fun x -> x in (id 1) + (id 2), but you don't need to handle let id = fun x -> x in (id 1) < 2 && (id true). These are known as weakly-polymorphic types.
Did you forget to return a value from the decorated function?
You cannot use lists,dictionaries or any other mutable data type as a key for a python dictionary. You are going to have to figure out a different way to rememer arguments containing dictionaries/lists and the keyword arguments.
You should think carefully what happens to control flow when an exception is thrown? Based on that, think how you need to adjust indentation.
Exceptions are a value like any other, than can be stored, and then thrown again (read the docs on try/catch/raise).
Yes.
@memoized def foo(a,b,c): ... foo(5,3,2) foo(5,c=2,b=3)
In the first case the decorated function would see 5,3,2 as positional arguments, and in the second it would see 5 as a positional argument, and c=2 and b=3 as keyword arguments. So unfortunately, these would be different calls. (i.e. you can't memoize the second, using the result of the first).
Yes. Create a new python script (lets call it foo.py) with the following contents:
from decorators import * run_examples()Then from the command line run "python3 foo.py > output.txt" and Voila!