--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/7c5e942f-1e55-4f90-bc79-79dc0622d292%40googlegroups.com.
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/Avea6YFZLRQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2BPR4X_oAq4M5o8mA0EZ9Ck32ZEgwhPhtjHCZOWENkC6g%40mail.gmail.com.
sequence|> String.to_charlist|> Enum.chunk(l, 1)|> Flow.from_enumerable|> Flow.map(fn e -> Enum.chunk(e, k, 1) end)
sequence|> String.to_charlist|> Stream.chunk(e, k, 1)|> Flow.from_enumerable|> ...
--
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/Avea6YFZLRQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4KpD-tf5p5sAS2nwZusd0reKdti-zL8-wzf%3DHjD8p%3D5qQ%40mail.gmail.com.
sequence|> String.to_charlist|> Stream.chunk(l, 1)|> Flow.from_enumerable|> Flow.flat_map(&find_sequences(&1, k))|> Enum.to_listdef find_sequences(e, k) doe|> Enum.chunk(k, 1)|> Enum.reduce(%{}, fn w, acc ->
Map.update(acc, w, 1, & &1 + 1)end)
|> Enum.reject(fn({_, n}) -> n < t end)|> Enum.map(fn({seq, _}) -> seq end)end
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CA%2BKdhmg2EZt6SLgE8g_oH%2B-Jjpx075BmPOvfePSvjQZsitXVVg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4Kv-5pBcqEPLi2ejhfze0yKTkh8FTUieQ-hon3HB6DsoQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CA%2BKdhmj8ejinTB502T5nJWqrfpkDdK%3DN0Ds0LRg78EmOgeHC-w%40mail.gmail.com.
I believe you don't want to call Flow.chunk/2. Calling Enum.chunk(l, 1) before Flow.from_enumerable/2 is the way to go in your case as it guarantees *chunks*, and not letters, are spread around on Flow.map/2. If instead you called Flow.chunk/2 after Flow.from_enumerable/2, the DNA order would be lost by the time you get to Flow.chunk/2. You would effectively chunk items in random order. I would possibly only suggest to use Stream.chunk/2 instead of Enum.chunk/2 (so you don't need to build all chunks upfront).
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4LHDRJpNpmHKNnw4TRtfZy-0uk5%2B6pNxB-DghzD_gyaSw%40mail.gmail.com.
--
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/Avea6YFZLRQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-lang-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/7da27c82-8078-4adf-b8ad-75373af08d6a%40googlegroups.com.
Do you mean that if Flow.chunk was implemented that it would behave differently from Enum or Stream.chunk?
[0, 1, 2, 3] |> Enum.to_list
[0, 1, 2, 3]
[0, 1, 2, 3] |> Flow.from_enumerable |> Enum.to_list