   test "Discount.to_html_each/2 compiles a list of Markdown documents and calls function for each item" do
     [ markdown_list, expected_list ] = get_prepared_lists
 
-    Discount.to_html_each markdown_list, fn(result_item) ->
-      assert Enum.any?(expected_list, fn(e)-> e == result_item end)
+    Discount.to_html_each markdown_list, fn (result_item) ->
+      assert Enum.any?(expected_list, &(&1 == result_item))
     end
   end
 

  end

  defp create_simple_list(itemcount, markdown, html) do
    num_list = Enum.to_list(1 .. itemcount)
    [
      ( num_list |> Enum.map(fn(_) -> markdown end) ),
      ( num_list |> Enum.map(fn(_) -> html end) )
    ]
  end

  defp create_list(itemcount, markdown, html) do
    num_list = Enum.to_list(1 .. itemcount)
    [
      ( num_list
        |> Enum.map(fn(idx) -> "#{markdown}\n*idx: #{idx}*" end) ),
      ( num_list
        |> Enum.map(fn(idx) -> "#{html}\n\n<p><em>idx: #{idx}</em></p>" end) )
    ]
  end
end

  test "Discount.to_html/2 compiles a list of Markdown documents and calls function with result list" do
    [ markdown_list, expected_list ] = get_prepared_lists

    Discount.to_html markdown_list, &(assert expected_list == &1)
  end


