getSlot takes a sequence (string), so if 'i' var is typed as a number, there
must be a problem with the foreach loop.
I've just discovered that foreach can take 2 or 3 parameters, the 2 params
version being 'element' and 'code', and the 3 param version being 'index',
'element' and 'index' are set for you and should be available during each iteration with the correct value.
Io> list(6,7,8,9) foreach(i,j , i println)
Io> list(6,7,8,9) foreach(i,j , j println)
Io> list(6,7,8,9) foreach(i, i println)
you could try to print i type inside the foreach loop like
Number getSlots foreach(i, i type println)