compare_a_list_of_strings_1.sf 187 B

1234567891011
  1. #!/usr/bin/ruby
  2. #
  3. ## https://rosettacode.org/wiki/Compare_a_list_of_strings
  4. #
  5. var arr = [1,2,3,4,5];
  6. say (arr.unique.len == 1); # all equal?
  7. say (arr == arr.sort); # sorted?