0

I am trying to print the incoming list but i am getting this weird output

this is one of the functions

def printlist(arr,indx,coming_list,sos,target) 
 when indx == length(arr) do
  if sos == target do 
   IO.write coming_list
 end
end

output

Output

I have used IO.inspect i'm getting this

Output

Now i didn't know how to arrange this coming sublist in a another list like this 12 => [[2,2,5,3],[4,5,3],[7,2,3]] like that
Please help me

Jadu
  • 489
  • 3
  • 10
  • The question is unclear. There seem to be two unrelated questions, one about the strange output (see my answer), one about a desire to transform a list into another list but without a clear requirement. – bortzmeyer Oct 17 '22 at 06:34

1 Answers1

0

IO.write just outputs the bytes in the list. 2, 3, 4, etc are just control codes in ASCII, hence the strange output.

bortzmeyer
  • 34,164
  • 12
  • 67
  • 91