The Echo utility in LITTLE

Command line arguments of the LITTLE interpreter, if present, can be retrieved via (little.lang.System:arguments) method, which returns a specialized iterator object.


   (package test)

   (using
        little.io.TextOutputStream
        little.lang.System)

   (class Echo ()
        (method main () :static
             (let ((arguments (System:arguments)))
                  (while (arguments:hasMoreElements)
                       ((TextOutputStream:out):println (arguments:nextElement)))))

   )