Adriandmen / 05AB1E

A concise stack-based golfing language
MIT License
760 stars 48 forks source link

BUG: builtin `j` doesn't work on integer-lists (as first argument) #161

Closed kcruijss closed 4 years ago

kcruijss commented 4 years ago

As the title states, j doesn't work on integer-lists, resulting in the error message:

** (FunctionClauseError) no function clause matching in String.Unicode.length/1    

The following arguments were given to String.Unicode.length/1:

    # 1
    1

(elixir) lib/elixir/unicode/unicode.ex:255: String.Unicode.length/1
(osabie) lib/commands/str_commands.ex:248: Commands.StrCommands.leftpad_with/3
(elixir) lib/stream.ex:562: anonymous fn/4 in Stream.map/2
(elixir) lib/enum.ex:3281: Enumerable.List.reduce/3
(elixir) lib/stream.ex:1553: Enumerable.Stream.do_each/4
(elixir) lib/stream.ex:857: Stream.do_transform/5
(elixir) lib/stream.ex:1553: Enumerable.Stream.do_each/4
(elixir) lib/enum.ex:2979: Enum.reverse/1

Try it online to reproduce.
With strings (i.e. after using § it works fine: try it online.
Came across it in this codegolf answer of mine.