Sha256: ac130f273368f9588559a0e2e5dffcaefe2ad454e1cd0410ba59fc61803b7932

Contents?: true

Size: 642 Bytes

Versions: 151

Compression:

Stored size: 642 Bytes

Contents

defmodule HelloWorld do
  @moduledoc """
  Elixir counts the number of arguments as part of the function name.
  For instance;

      def hello() do
      end

  would be a completely different function from

      def hello(name) do
      end

  Can you find a way to make all the tests pass with just one
  function?

  Hint: look into argument defaults here:
  http://elixir-lang.org/getting-started/modules.html#default-arguments
  """

  @doc """
  Greets the user by name, or by saying "Hello, World!"
  if no name is given.
  """
  @spec hello(String.t) :: String.t
  def hello(name) do

    "Your implementation goes here"

  end
end

Version data entries

151 entries across 151 versions & 1 rubygems

Version Path
trackler-2.0.8.51 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.50 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.49 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.48 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.47 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.46 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.45 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.44 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.43 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.42 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.41 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.40 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.39 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.38 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.37 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.36 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.35 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.34 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.33 tracks/elixir/exercises/hello-world/hello_world.exs
trackler-2.0.8.32 tracks/elixir/exercises/hello-world/hello_world.exs