--- a/sandbox/jlf/samples/pipeline/pipe_extension_test.output.txt
+++ b/sandbox/jlf/samples/pipeline/pipe_extension_test.output.txt
@@ -23,27 +23,55 @@
 
 
 -- ...ascending (default)
-.array~of(b, a, c)~pipe(.sort byValue ascending | .displayer)
+-- The order of options is important : a value option is impacted only by the preceding options
+-- This is because several value options can be specified, and a sort is made for each.
+.array~of(b, a, c)~pipe(.sort ascending byValue | .displayer)
 2 : A
 1 : B
 3 : C
 
 
 -- ...descending
-.array~of(b, a, c)~pipe(.sort byValue descending | .displayer)
+.array~of(b, a, c)~pipe(.sort descending byValue | .displayer)
 3 : C
 1 : B
 2 : A
 
 
 -- ...by index descending
-.array~of(b, a, c)~pipe(.sort byIndex descending | .displayer)
+-- The order of options is important : an index option is impacted only by the preceding options.
+-- This is because several index options can be specified, and a sort is made for each.
+.array~of(b, a, c)~pipe(.sort descending byIndex | .displayer)
 3 : C
 2 : A
 1 : B
 
 
--- ...descending (using a comparator).
+-- ...caseless (stable by default)
+.array~of("bb", "AA", "bB", "Aa", "Bb", "aA", "BB", "aa")~pipe(.sort caseless byValue | .displayer)
+2 : AA
+4 : Aa
+6 : aA
+8 : aa
+1 : bb
+3 : bB
+5 : Bb
+7 : BB
+
+
+-- ...caseless quickSort (unstable)
+.array~of("bb", "AA", "bB", "Aa", "Bb", "aA", "BB", "aa")~pipe(.sort caseless quickSort byValue | .displayer)
+2 : AA
+4 : Aa
+6 : aA
+8 : aa
+1 : bb
+3 : bB
+5 : Bb
+7 : BB
+
+
+-- Sort descending with a comparator.
 -- The DescendingComparator use the default CompareTo, which is made on values.
 .array~of(b, a, c)~pipe(.sortWith[.DescendingComparator~new] | .displayer)
 3 : C
@@ -51,16 +79,7 @@
 2 : A
 
 
--- ...caseless
-.array~of("b", "A", "c", "a", "B")~pipe(.sort byValue caseless | .displayer)
-2 : A
-4 : a
-1 : b
-5 : B
-3 : c
-
-
--- ...stable (default)
+-- Sort by column with a comparator.
 .array~of("c:2", "b:2", "A:2", "c:1", "a:1", "B:1", "C:3")~pipe(,
     .sortWith[.InvertingComparator~new(.CaselessColumnComparator~new(3,1))] |,
     .sortWith[.CaselessColumnComparator~new(1,1)] |,
@@ -75,9 +94,116 @@
 4 : c:1
 
 
+-- Do something for each item (no returned value).
+.array~of(1, 2, 3)~pipe(.do["say 'value='value 'index='index"] | .displayer)
+value=1 index=an Array
+1 : 1
+value=2 index=an Array
+2 : 2
+value=3 index=an Array
+3 : 3
+
+
+-- Do something for each item (the returned result replaces the value).
+.array~of(1, 2, 3)~pipe(.do["return 2*value"] | .displayer)
+1 : 2
+2 : 4
+3 : 6
+
+
+-- Inject a value for each item. The index of the injected value is made of two indexes.
+.array~of(1, 2, 3)~pipe(.inject["value+1"] | .displayer)
+1 : 1
+1.1 : 2
+2 : 2
+2.1 : 3
+3 : 3
+3.1 : 4
+
+
+-- Inject two values for each item (each item of the returned collection is written in the pipe).
+.array~of(1, 2, 3)~pipe(.inject[".array~of(value+1, value+2)"] | .displayer)
+1 : 1
+1.1 : 2
+1.2 : 3
+2 : 2
+2.1 : 3
+2.2 : 4
+3 : 3
+3.1 : 4
+3.2 : 5
+
+
+-- Each injected value can be used as input to inject a new value, recursively.
+-- If the recursion is infinite, must specify a limit (here 10).
+.array~of(1, 2, 3)~pipe(.inject["value+1"] recursive.10 | .displayer)
+1 : 1
+1.1 : 2
+1.1.1 : 3
+1.1.1.1 : 4
+1.1.1.1.1 : 5
+1.1.1.1.1.1 : 6
+1.1.1.1.1.1.1 : 7
+1.1.1.1.1.1.1.1 : 8
+1.1.1.1.1.1.1.1.1 : 9
+1.1.1.1.1.1.1.1.1.1 : 10
+1.1.1.1.1.1.1.1.1.1.1 : 11
+2 : 2
+2.1 : 3
+2.1.1 : 4
+2.1.1.1 : 5
+2.1.1.1.1 : 6
+2.1.1.1.1.1 : 7
+2.1.1.1.1.1.1 : 8
+2.1.1.1.1.1.1.1 : 9
+2.1.1.1.1.1.1.1.1 : 10
+2.1.1.1.1.1.1.1.1.1 : 11
+2.1.1.1.1.1.1.1.1.1.1 : 12
+3 : 3
+3.1 : 4
+3.1.1 : 5
+3.1.1.1 : 6
+3.1.1.1.1 : 7
+3.1.1.1.1.1 : 8
+3.1.1.1.1.1.1 : 9
+3.1.1.1.1.1.1.1 : 10
+3.1.1.1.1.1.1.1.1 : 11
+3.1.1.1.1.1.1.1.1.1 : 12
+3.1.1.1.1.1.1.1.1.1.1 : 13
+
+
+-- Factorial, no value injected for -1
+.array~of(-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9)~pipe(.inject[,
+    "use arg n;",
+    "if n < 0 then return;",
+    "if n == 0 then return 1;",
+    "return n * .context~executable~call(n - 1)"] | .displayer)
+1 : -1
+2 : 0
+2.1 : 1
+3 : 1
+3.1 : 1
+4 : 2
+4.1 : 2
+5 : 3
+5.1 : 6
+6 : 4
+6.1 : 24
+7 : 5
+7.1 : 120
+8 : 6
+8.1 : 720
+9 : 7
+9.1 : 5040
+10 : 8
+10.1 : 40320
+11 : 9
+11.1 : 362880
+
+
 -- Select files whose name contains "rexx" in c:\program files\oorexx
 .file~new("c:\program files\oorexx")~listFiles~pipe(,
-    .select["arg(1)~name~caselessPos('rexx') <> 0"] |,
+    .select["value~name~caselessPos('rexx') <> 0"] |,
     .displayer,
     )
 11 : c:\program files\oorexx\ooRexxTry.rex
@@ -93,6 +219,70 @@
 21 : c:\program files\oorexx\rexxpaws.exe
 22 : c:\program files\oorexx\rexxtry.rex
 23 : c:\program files\oorexx\rexxutil.dll
+
+
+-- Select files whose name contains "rexx" in c:\program files\oorexx, sorted by file size.
+-- The "length" message is sent to the value.
+.file~new("c:\program files\oorexx")~listFiles~pipe(,
+    .select["value~name~caselessPos('rexx') <> 0"] |,
+    .sortWith[.MessageComparator~new("length/N")] |,
+    .displayer,
+    )
+16 : c:\program files\oorexx\rexx.ico
+12 : c:\program files\oorexx\orexxole.cls
+22 : c:\program files\oorexx\rexxtry.rex
+11 : c:\program files\oorexx\ooRexxTry.rex
+20 : c:\program files\oorexx\rexxhide.exe
+19 : c:\program files\oorexx\rexxc.exe
+15 : c:\program files\oorexx\rexx.exe
+21 : c:\program files\oorexx\rexxpaws.exe
+13 : c:\program files\oorexx\orexxole.dll
+18 : c:\program files\oorexx\rexxapi.dll
+23 : c:\program files\oorexx\rexxutil.dll
+17 : c:\program files\oorexx\rexx.img
+14 : c:\program files\oorexx\rexx.dll
+
+
+-- Same as above, but simpler... You can sort directly by length, no need of MessageComparator
+.file~new("c:\program files\oorexx")~listFiles~pipe(,
+    .select["value~name~caselessPos('rexx') <> 0"] |,
+    .sort "value~length" |,
+    .displayer,
+    )
+16 : c:\program files\oorexx\rexx.ico
+12 : c:\program files\oorexx\orexxole.cls
+22 : c:\program files\oorexx\rexxtry.rex
+11 : c:\program files\oorexx\ooRexxTry.rex
+20 : c:\program files\oorexx\rexxhide.exe
+19 : c:\program files\oorexx\rexxc.exe
+15 : c:\program files\oorexx\rexx.exe
+21 : c:\program files\oorexx\rexxpaws.exe
+13 : c:\program files\oorexx\orexxole.dll
+18 : c:\program files\oorexx\rexxapi.dll
+23 : c:\program files\oorexx\rexxutil.dll
+17 : c:\program files\oorexx\rexx.img
+14 : c:\program files\oorexx\rexx.dll
+
+
+-- Sort by file size, then by file extension (with only one .sort pipestage)
+.file~new("c:\program files\oorexx")~listFiles~pipe(,
+    .select["value~name~caselessPos('rexx') <> 0"] |,
+    .sort "value~length" "filespec('e', value~name)" |,
+    .displayer,
+    )
+12 : c:\program files\oorexx\orexxole.cls
+13 : c:\program files\oorexx\orexxole.dll
+18 : c:\program files\oorexx\rexxapi.dll
+23 : c:\program files\oorexx\rexxutil.dll
+14 : c:\program files\oorexx\rexx.dll
+20 : c:\program files\oorexx\rexxhide.exe
+19 : c:\program files\oorexx\rexxc.exe
+15 : c:\program files\oorexx\rexx.exe
+21 : c:\program files\oorexx\rexxpaws.exe
+16 : c:\program files\oorexx\rexx.ico
+17 : c:\program files\oorexx\rexx.img
+22 : c:\program files\oorexx\rexxtry.rex
+11 : c:\program files\oorexx\ooRexxTry.rex
 
 
 -- All instance methods of the context.
@@ -148,7 +338,7 @@
 
 -- All private methods of the context.
 .context~instanceMethods~pipe(,
-    .select["arg(1)~isPrivate"] |,
+    .select["value~isPrivate"] |,
     .sort byIndex |,
     .displayer,
     )
@@ -157,33 +347,101 @@
 UNSETMETHOD : a Method
 
 
--- Instance methods of the context (not including those inherited).
--- The 'instanceMethods' has been moved in the pipeline, to get the class from the current item.
--- The context is written in the pipeline, followed by the returned methods.
-.context~pipe(,
-    .inject["arg(1)~instanceMethods(arg(1)~class)"] |,
+-- Instance methods of the specified classes (not including those inherited).
+-- Each class is written in the pipeline, followed by the returned methods.
+.array~of(.RexxContext, .Package, .Method)~pipe(,
+    .inject["value~instanceMethods(value~class)"] |,
     .sort byIndex |,
     .displayer,
     )
-1 : a RexxContext
-1.ARGS : a Method
-1.CONDITION : a Method
-1.COPY : a Method
-1.DIGITS : a Method
-1.EXECUTABLE : a Method
-1.FORM : a Method
-1.FUZZ : a Method
-1.LINE : a Method
-1.PACKAGE : a Method
-1.RS : a Method
-1.VARIABLES : a Method
+1 : The RexxContext class
+1.<> : a Method
+1.= : a Method
+1.== : a Method
+1.>< : a Method
+1.BASECLASS : a Method
+1.DEFAULTNAME : a Method
+1.DEFINE : a Method
+1.DELETE : a Method
+1.ENHANCED : a Method
+1.HASHCODE : a Method
+1.ID : a Method
+1.INHERIT : a Method
+1.ISSUBCLASSOF : a Method
+1.METACLASS : a Method
+1.METHOD : a Method
+1.METHODS : a Method
+1.MIXINCLASS : a Method
+1.QUERYMIXINCLASS : a Method
+1.SUBCLASS : a Method
+1.SUBCLASSES : a Method
+1.SUPERCLASS : a Method
+1.SUPERCLASSES : a Method
+1.UNINHERIT : a Method
+1.\= : a Method
+1.\== : a Method
+2 : The Package class
+2.<> : a Method
+2.= : a Method
+2.== : a Method
+2.>< : a Method
+2.BASECLASS : a Method
+2.DEFAULTNAME : a Method
+2.DEFINE : a Method
+2.DELETE : a Method
+2.ENHANCED : a Method
+2.HASHCODE : a Method
+2.ID : a Method
+2.INHERIT : a Method
+2.ISSUBCLASSOF : a Method
+2.METACLASS : a Method
+2.METHOD : a Method
+2.METHODS : a Method
+2.MIXINCLASS : a Method
+2.QUERYMIXINCLASS : a Method
+2.SUBCLASS : a Method
+2.SUBCLASSES : a Method
+2.SUPERCLASS : a Method
+2.SUPERCLASSES : a Method
+2.UNINHERIT : a Method
+2.\= : a Method
+2.\== : a Method
+3 : The Method class
+3.!DEFINE_CLASS_METHOD : a Method
+3.!DEFINE_METHODS : a Method
+3.!REXXDEFINED : a Method
+3.<> : a Method
+3.= : a Method
+3.== : a Method
+3.>< : a Method
+3.BASECLASS : a Method
+3.DEFAULTNAME : a Method
+3.DEFINE : a Method
+3.DELETE : a Method
+3.ENHANCED : a Method
+3.HASHCODE : a Method
+3.ID : a Method
+3.INHERIT : a Method
+3.ISSUBCLASSOF : a Method
+3.METACLASS : a Method
+3.METHOD : a Method
+3.METHODS : a Method
+3.MIXINCLASS : a Method
+3.QUERYMIXINCLASS : a Method
+3.SUBCLASS : a Method
+3.SUBCLASSES : a Method
+3.SUPERCLASS : a Method
+3.SUPERCLASSES : a Method
+3.UNINHERIT : a Method
+3.\= : a Method
+3.\== : a Method
 
 
 -- Methods (not inherited) of all the classes whose id starts with "R".
 .environment~pipe(,
-    .select["arg(1)~isA(.class)"] |,
-    .select["arg(1)~id~caselessAbbrev('R') <> 0"] |,
-    .inject["arg(1)~methods(arg(1))"] |,
+    .select["value~isA(.class)"] |,
+    .select["value~id~caselessAbbrev('R') <> 0"] |,
+    .inject["value~methods(value)"] |,
     .sort byIndex |,
     .displayer,
     )
@@ -251,7 +509,7 @@
 -- All packages that are visible from current context, including the current package (source of the pipeline).
 -- The .displayer is not useful here (will be extended to let choose the values to display)...
 .context~package~pipe(,
-    .inject["arg(1)~importedPackages"] recursive |,
+    .inject["value~importedPackages"] recursive |,
     .sort |,
     .displayer,
     )
@@ -268,24 +526,30 @@
 1.3.1 : a Package
 1.3.2 : a Package
 1.3.2.1 : a Package
+1.3.2.1.1 : a Package
+1.3.2.2 : a Package
+1.3.2.2.1 : a Package
+1.3.2.3 : a Package
 1.3.3 : a Package
 1.3.3.1 : a Package
+1.3.4 : a Package
+1.3.4.1 : a Package
 1.4 : a Package
 1.4.1 : a Package
 
 
 -- ...In the meantime, use the .do pipeStage to display the useful values.
 -- The package names are indented to highlight the dependency between packages.
--- arg(2) returns the current index, which is always an array.
+-- The index is always an array.
 
 -- Notice the circular dependency between packages (supported by inject - the recursion is stopped) :
 -- extensions.cls --> doers.cls --> extensions.cls
 -- This is because of Doers.AddVisibilityFrom
 
 .context~package~pipe(,
-    .inject["arg(1)~importedPackages"] recursive |,
+    .inject["value~importedPackages"] recursive |,
     .sort |,
-    .do["say '  '~copies(arg(2)~items) arg(1)~name"],
+    .do["say '  '~copies(index~items) value~name"],
     )
    D:\local\Rexx\ooRexx\svn\sandbox\jlf\samples\pipeline\pipe_extension_test.rex
      d:\local\Rexx\ooRexx\svn\sandbox\jlf\samples\extension\extensions.cls
@@ -298,6 +562,12 @@
        d:\local\Rexx\ooRexx\svn\sandbox\jlf\samples\concurrency\activity.cls
      d:\local\Rexx\ooRexx\svn\sandbox\jlf\samples\pipeline\pipe_extension.cls
        d:\local\Rexx\ooRexx\svn\sandbox\jlf\samples\pipeline\pipe.rex
+       d:\local\Rexx\ooRexx\svn\sandbox\jlf\samples\extension\doers.cls
+         d:\local\Rexx\ooRexx\svn\sandbox\jlf\samples\extension\extensions.cls
+           d:\local\Rexx\ooRexx\svn\sandbox\jlf\samples\extension\doers.cls
+         d:\local\Rexx\ooRexx\svn\sandbox\jlf\samples\concurrency\coactivity.cls
+           d:\local\Rexx\ooRexx\svn\sandbox\jlf\samples\concurrency\activity.cls
+         d:\local\Rexx\ooRexx\svn\sandbox\jlf\samples\pipeline\pipe_extension.cls
        d:\local\Rexx\ooRexx\svn\sandbox\jlf\samples\concurrency\coactivity.cls
          d:\local\Rexx\ooRexx\svn\sandbox\jlf\samples\concurrency\activity.cls
        d:\local\Rexx\ooRexx\svn\sandbox\jlf\samples\rgf_util2\rgf_util2_wrappers.rex