Tro*_*han 0 elixir
Ruby有select和reject- 如何返回给定函数返回trueElixir中可枚举的所有元素?什么是关键字?
select
reject
true
Tro*_*han 5
在Elixir中,相应的函数select是filter/2.
filter/2
所以使用filter/2而不是select和reject/2红宝石一样.
reject/2
有关官方文档,请参阅:
filter/2:https://hexdocs.pm/elixir/Enum.html#filter/2
reduce/2:(与过滤器相反):https: //hexdocs.pm/elixir/Enum.html#reduce/2
reduce/2
归档时间:
9 年,4 月 前
查看次数:
1205 次
最近记录:
6 年,8 月 前