yes, List.contains?/2 will be a really good addition too. I can contribute the code for all of them once agreed on their behaviour and need.
On Tue, 21 Feb 2017 16:06:15 +0100 Michał Muskała <mic...@muskala.eu> wrote: > I think it would be nice to have starts_with?, ends_with? and contains? > similar to the String > module. > > Michał. > > On 21 Feb 2017, 15:39 +0100, eksperimental <eksperimen...@autistici.org>, > wrote: > > Hi, List.starts_with?/2 have recently been introduced > > https://github.com/elixir-lang/elixir/pull/5789 > > > > I was working on improving the specs and the code, > > and I have realized there are a few issues I would to work on. > > > > Initially would like to to know whether we should support improper lists, > > that would determine > > how the code can be optimized. > > > > I would say yes, we should support improper lists. > > But we also need to keep in mind that we will probably will end up adding > > List.ends_with?/2 too, > > so we need to keep that in mind > > > > If we support improper lists, prefix could be any term, not just a list. > > > > -- > > You received this message because you are subscribed to the Google Groups > > "elixir-lang-core" > > group. To unsubscribe from this group and stop receiving emails from it, > > send an email to > > elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on > > the web visit > > https://groups.google.com/d/msgid/elixir-lang-core/20170221213857.6c3a8f4f.eksperimental%40autistici.org. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/20170222075518.569b1ac5.eksperimental%40autistici.org. For more options, visit https://groups.google.com/d/optout.