Elixir pipes and anonymous functions I recently got started with Elixir.  I'm used to F#'s pipes, and Seq.map and LINQ's .Select statements.  Things are different in Elixir, and the code I have seems very ugly.  Anon functions in anon functions.

defrecord FileData, name: "", date: nil
  def filedetails() do
    files = File.ls!
    datestr = fn {{year, month, day}, _time} -&gt; "#{day}/#{month}/#{year}" end
    filedates = files |&gt; (Stream.map &amp;(File.stat!(&amp;1)))
                      |&gt; (Stream.map &amp;(&amp;1.ctime))
                      |&gt; Stream.map &amp;(datestr.(&amp;1))


    Enum.zip(files,filedates)
      |&gt; Enum.map fn {n,d}-&gt;FileData[name: n, date: d] end

  end


How should this be done?
I'm not sure why you'd need to pipe three different streams - one for every manipulation. I'd probably use one Stream to do all the manipulations together, something like:

filedates = files |&gt; Stream.map &amp;((&amp;1 |&gt; File.stat!).ctime |&gt; datastr.())


or

filedates = files |&gt; Stream.map &amp;(File.stat!(&amp;1).ctime |&gt; datastr.())