#!/usr/bin/ruby
var arr = (1..10 -> map{10.irand});
var arc = (arr.map{|i|i});
arr.grep {|n| n > 3} == (
arr.grep { _ > 3 }
) || die "grep error"
arr.map {|x| x + 3} == (
arr.map { _ + 3}
) || die "map error"
{
|x,y|
x+y
}.call(10,32) == 42 ||
die "block error"
arc == arr ||
die "arr modified in place"
say "** Test passed!";