OSDN Git Service

Clean up Zipper notebook.
[joypy/Thun.git] / joy / library.py
index 551d6c6..800ff3b 100644 (file)
@@ -203,6 +203,7 @@ class Def(object):
             name, body = text_to_expression(line)
             if name not in dictionary:
                 inscribe(class_(name, body), dictionary)
+##            inscribe(class_(name, body), dictionary)
 
 
 #
@@ -784,6 +785,22 @@ def b(stack, expression, dictionary):
 
 @inscribe
 @FunctionWrapper
+def ii(stack, expression, dictionary):
+    '''
+    ::
+
+           ... a [Q] ii
+        ------------------
+            ... Q a Q
+
+    '''
+    quote, (a, stack) = stack
+    expression = concat(quote, (a, concat(quote, expression)))
+    return stack, expression, dictionary
+
+
+@inscribe
+@FunctionWrapper
 def dupdip(stack, expression, dictionary):
     '''
     ::