   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, fn(result_list) ->
-      assert expected_list == result_list
-    end
+    Discount.to_html markdown_list, &(assert expected_list == &1)
   end
 
 

  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)
    end
  end


  end

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

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