Commits

Jürgen Bömmels committed ebb0242

Add another helper function

Comments (0)

Files changed (1)

 
     return w_cdr
 
+def lst2plst(w_list):
+    """coverts W_Pair scheme list into a python list() of W_Root"""
+    lst = []
+    w_iter = w_list
+    while w_iter is not w_nil:
+        if not isinstance(w_iter, W_Pair):
+            raise WrongArg(w_list, "List")
+        lst.append(w_iter.car)
+        w_iter = w_iter.cdr
+
+    return lst
+
 ##
 # Continuations
 ##