File: mlr

package info (click to toggle)
miller 6.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 87,820 kB
  • sloc: ruby: 162; sh: 119; makefile: 87
file content (17 lines) | stat: -rw-r--r-- 342 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
end {
  my_array = [2, 9, 10, 3, 1, 4, 5, 8, 7, 6];
  print "Original:";
  print my_array;

  print;
  print "Squares:";
  print apply(my_array, func(e) { return e**2 });

  print;
  print "Cubes:";
  print apply(my_array, func(e) { return e**3 });

  print;
  print "Sorted cubes:";
  print sort(apply(my_array, func(e) { return e**3 }));
}