I'm having trouble seeing the utility. Could I see a few examples of how you got into that nested list state on the first place?
On Sun, Sep 25, 2016, 8:00 PM Chris Keele <[email protected]> wrote: > That’s about it. And it recurses. Check out the implementation I linked > to, with examples: > https://github.com/christhekeele/elixir/commit/2a951a8a8a5b5eeb636fe00ca1ce11e8da58bb5f > > > > -- > Chris Keele > Web Developer > > On September 25, 2016 at 7:36:32 PM, Peter Hamilton ( > [email protected]) wrote: > > How is its implementation more than just Enum.map(list, &hd/1) ? > > I imagine we only conditionally apply hd if it's an element is a list of > length 1. Does it do anything else? > On Sun, Sep 25, 2016, 7:12 PM Chris Keele <[email protected]> wrote: > >> I can see how List.unwrap is a confusing–it does sound like the >> mathematical opposite. >> >> Perhaps List.strip/1 is a more intuitive name? >> >> >> -- >> Chris Keele >> Web Developer >> >> On September 25, 2016 at 6:55:11 PM, Peter Hamilton ( >> [email protected]) wrote: >> >> Is [1,2] valid output of List.wrap? If it's not in the range of output, I >> think we could error on it as input to List.unwrap. >> >> Exactly once might be correct semantics, will have to play with some >> examples. >> >> On Sun, Sep 25, 2016, 3:46 PM Chris Keele <[email protected]> wrote: >> >>> If List.unwrap([1]) = 1, how would you handle List.unwrap([1, 2])? [1, >>> 2] would be inconsistent. That’s more of a splat/unquote_splicing operation. >>> -- >>> 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 [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/elixir-lang-core/CAOtzO5KD_BtWo1pkoZOCxPRJ-jqCc8H3p3kqm3AzKFXi5d%2B%3DOg%40mail.gmail.com >>> <https://groups.google.com/d/msgid/elixir-lang-core/CAOtzO5KD_BtWo1pkoZOCxPRJ-jqCc8H3p3kqm3AzKFXi5d%2B%3DOg%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> >> You received this message because you are subscribed to a topic in the >> Google Groups "elixir-lang-core" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/elixir-lang-core/rvI1kE8xp3Q/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/elixir-lang-core/CAOMhEnwu0v%2B-GyT8_QWtLxxCtkiOT7GrowAgY81w0mbtgygbfw%40mail.gmail.com >> <https://groups.google.com/d/msgid/elixir-lang-core/CAOMhEnwu0v%2B-GyT8_QWtLxxCtkiOT7GrowAgY81w0mbtgygbfw%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> >> 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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/elixir-lang-core/CAOtzO5JHUUPss%2BssJ-UBRd3F3eWX3UKLRWGkWfcr12TFCUj9mg%40mail.gmail.com >> <https://groups.google.com/d/msgid/elixir-lang-core/CAOtzO5JHUUPss%2BssJ-UBRd3F3eWX3UKLRWGkWfcr12TFCUj9mg%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "elixir-lang-core" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/elixir-lang-core/rvI1kE8xp3Q/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > [email protected]. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/CAOMhEnzFbh%3DdFW68v7YNZnkJz009EOkE6ScAaGw3oUjmvYgTRw%40mail.gmail.com > <https://groups.google.com/d/msgid/elixir-lang-core/CAOMhEnzFbh%3DdFW68v7YNZnkJz009EOkE6ScAaGw3oUjmvYgTRw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/CAOtzO5J%3DQO1qWpuOMfhpon05v226VTEDsYs95Lf0ci%3DoRHpmgg%40mail.gmail.com > <https://groups.google.com/d/msgid/elixir-lang-core/CAOtzO5J%3DQO1qWpuOMfhpon05v226VTEDsYs95Lf0ci%3DoRHpmgg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAOMhEnzdoCjFTu65aCot-5t6bFgxgrroSH_FKaUg1qi%3DSsG1%2BA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
