Weird Output in Elixir

46 Views Asked by At

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

1

There are 1 best solutions below

0
bortzmeyer On

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