(FunctionClauseError) no function clause matching in List.foldl/3

List.foldl accepts a list and you’re giving it a string, which is not a list. I believe you could first split it with String.codepoints before feeding it to foldl.