Commits

Alex Suraci committed d49a06c

updated delegation stuff in core docs

  • Participants
  • Parent commits c044913

Comments (0)

Files changed (1)

doc/main/core.atomo

 }
 
 #define:{
-    x delegates-to: y
+    x delegating-to: y
     > @ok
 }body:{
-    Adds #atomo:y to #atomo:(x)'s list of delegates.
+    Yields a new object with #atomo:(x)'s method table and #atomo:(y) affixed to its delegates list.
+}
+
+#define:{
+    x with-delegates: ds
+    | ds is-a?: List
+    > @ok
+}body:{
+    Yields a new object with #atomo:(x)'s method table and #atomo:(ds) as its delegates list.
 }
 
 #define:{
         X = Object clone
         Y = Object clone
         Y delegates-to?: X
-        Y delegates-to: X
-        Y delegates-to?: X
+        Y (delegating-to: X) delegates-to?: X
     })
 }
 
     #example:({
       x = 1 clone
       x delegates
-      x delegates-to: 2
-      x delegates
+      x (delegating-to: 2) delegates
     })
 }
 
 
     #example:({
       1 clone super
-      1 clone join: { delegates-to: 2; super }
+      1 clone (delegating-to: 2) super
     })
 }
 
         Y = Object clone
         X is-a?: X
         Y is-a?: X
-        Y delegates-to: X
-        Y is-a?: X
+        Y (delegating-to: X) is-a?: X
     })
 }
 
         X responds-to?: @foo
         X foo = 42
         X responds-to?: @foo
-        
+
         1 responds-to?: @(+ 2)
         1 responds-to?: @(+ "foo")
     })