add project structure

This commit is contained in:
Caleb Webber 2025-03-01 22:09:01 -05:00
parent a557909346
commit 1cfb34b7f2
11 changed files with 83 additions and 1 deletions

4
problems/.formatter.exs Normal file
View file

@ -0,0 +1,4 @@
# Used by "mix format"
[
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
]

26
problems/.gitignore vendored Normal file
View file

@ -0,0 +1,26 @@
# The directory Mix will write compiled artifacts to.
/_build/
# If you run "mix test --cover", coverage assets end up here.
/cover/
# The directory Mix downloads your dependencies sources to.
/deps/
# Where third-party dependencies like ExDoc output generated docs.
/doc/
# Ignore .fetch files in case you like to edit your project deps locally.
/.fetch
# If the VM crashes, it generates a dump, let's ignore it too.
erl_crash.dump
# Also ignore archive artifacts (built via "mix archive.build").
*.ez
# Ignore package tarball (built via "mix hex.build").
problems-*.tar
# Temporary files, for example, from tests.
/tmp/

6
problems/lib/euler.ex Normal file
View file

@ -0,0 +1,6 @@
defmodule Euler do
def f() do
IO.puts("Hello, world")
end
end

18
problems/lib/problems.ex Normal file
View file

@ -0,0 +1,18 @@
defmodule Problems do
@moduledoc """
Documentation for `Problems`.
"""
@doc """
Hello world.
## Examples
iex> Problems.hello()
:world
"""
def hello do
:world
end
end

28
problems/mix.exs Normal file
View file

@ -0,0 +1,28 @@
defmodule Problems.MixProject do
use Mix.Project
def project do
[
app: :problems,
version: "0.1.0",
elixir: "~> 1.16",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# {:dep_from_hexpm, "~> 0.3.0"},
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
]
end
end

View file

@ -33,6 +33,6 @@ sum = for n <- 1..28123,
s -> s + n s -> s + n
end end
(((28123*28124)/2) - sum) (((28123*28124)/2) - sum)
|> IO.puts() |> IO.puts()