Ad
  • Default User Avatar

    some print debugging goes a long way, even without knowing any erlang (as is my case)

    io_lib:format/2 returns chars() which is described at https://www.erlang.org/doc/man/io_lib#type-chars :

    This module contains functions for converting to and from strings (lists of characters). They are used for implementing the functions in the io module. There is no guarantee that the character lists returned from some of the functions are flat, they can be deep lists. Function lists:flatten/1 can be used for flattening deep lists.

    you're assuming that the result is a string, but chars() can be other structures than that

    this is why you may be getting a different outcome locally, it's chars() in both cases, but only in one case was it the same structure as a string

  • Default User Avatar

    just test, you must use another function when you press the 'attempt'