Method code for $list.numbered_text()

[Turn off line numbering]
  1: arg text;
  2: var line;
  3: 
  4: // receives a list of strings, returns that list with line numbers
  5: // prepended
  6: return map line in [1 .. text.length()] to ("%3r: %l".format(line, text[line]));

// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit

Tlon