elixir-plug / plug

Compose web applications with functions

Home Page:https://hex.pm/packages/plug

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

improper lists usage

Sed9yDataBank opened this issue ยท comments

๐Ÿ‘‹๐Ÿผ

I want to understand the reason of constructing an improper list here.

First Question: Is the usage of an improper list necessary here?:

[field, ?= | encode_value(value, encoder)]

# encoder fallback
  defp encode_pair(field, value, encoder) do
    [field, ?= | encode_value(value, encoder)]
  end

I think improper lists do not have many uses; also there are many functions that will error when given an improper list

Second Question: why this construct actually exists in Erlang?

Hi,
Can you Please use the ElixirForum for questions/help/feedback, where a wider community will be able to jump in? Thank you!

sure! sorry for budging in like that and thanks