Bal*_*ala 4 elixir
我有一个元素/数字,我正在管道Enum.into([])但Elixir抛出** (Protocol.UndefinedError) protocol Enumerable not implemented for 90
Enum.into([])
** (Protocol.UndefinedError) protocol Enumerable not implemented for 90
90 |> Enum.into([]) v = 65 v |> Enum.into([]) Enumerable not implemented for 65
cod*_*hal 7
Enum.into/2期望Enumerable作为第一个参数,因此错误.
要将单个元素传递到列表中,请使用List.wrap
65 |> List.wrap
归档时间:
9 年,6 月 前
查看次数:
355 次
最近记录: