     # assert String.contains?(output, "no such file or directory")
     assert output == 'no such file or directory'
   end
-  
+
   test "FizzBuzz" do
     fizzbuzz = fn
       (0, 0, _) -> "FizzBuzz"

      def double(n) do
        n * 2
      end
      
      # and the real syntax is just passing a "do" key and a block
      def triple(n), do: (
        n * 3
      )
      
      def quadruple(n), do: double(double(n))
    end
    
    assert Times.double(9) == 18
    assert Times.triple(10) == 30
    assert Times.quadruple(10) == 40
  end
  
  test "Factorial" do
    defmodule Factorial do
      # this is the same function (name + arity is identical)

      (_, 0, _) -> "Buzz"
      (_, _, word) -> word
    end

    assert fizzbuzz.(0, 0, "Foo") == "FizzBuzz"
    assert fizzbuzz.(0, 100, "Foo") == "Fizz"
    assert fizzbuzz.(100, 0, "Foo") == "Buzz"
    assert fizzbuzz.(100, 100, "Foo") == "Foo"

    func = fn (n) -> fizzbuzz.(rem(n,3), rem(n,5), n) end

    result = Enum.join(Enum.map((10..16), func), ", ")
    assert result == "Buzz, 11, Fizz, 13, 14, FizzBuzz, 16"
  end

  test "Function context" do
    name = "Franck"
    f = fn -> name end
    name = "Barry"

    assert f.() == "Franck"
    assert f.() != name

    f = fn (from) ->
      fn (to) -> "Hello #{to} from #{from}" end
    end

    x = f.("John")
    assert x.("Marisa") == "Hello Marisa from John"
    assert x.("Theresa") == "Hello Theresa from John"
  end

  test "Parameterized functions" do
    prefix = fn (the_prefix) -> fn(the_string) -> "#{the_prefix} #{the_string}" end end
    mrs = prefix.("Mrs")
