The Sol Programming Language!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

crasher_multiple_loops.sol 322B

12345678910111213141516
  1. execfile("tests/_lib.sol")
  2. func rec_tostring(v)
  3. return for i in v do
  4. continue if type(i) == "list" then
  5. rec_tostring(i)
  6. else
  7. tostring(i)
  8. end
  9. end
  10. end
  11. l = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]
  12. q = [ ["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"] ]
  13. assert_eq(rec_tostring(l), q, "nested continue-map fors")