mirror of
https://github.com/ivabus/pantry
synced 2024-11-25 18:05:07 +03:00
44 lines
776 B
YAML
44 lines
776 B
YAML
distributable:
|
|
url: https://github.com/elixir-lang/elixir/archive/refs/tags/v{{version}}.tar.gz
|
|
strip-components: 1
|
|
|
|
versions:
|
|
github: elixir-lang/elixir
|
|
strip: /v/
|
|
|
|
dependencies:
|
|
erlang.org: "*"
|
|
|
|
build:
|
|
dependencies:
|
|
tea.xyz/gx/make: "*"
|
|
script: |
|
|
make install
|
|
|
|
provides:
|
|
- bin/elixir
|
|
- bin/elixirc
|
|
- bin/iex
|
|
- bin/mix
|
|
|
|
test:
|
|
script: |
|
|
elixir --version
|
|
mkdir test
|
|
cp $FIXTURE test/test.exs
|
|
cd test
|
|
elixir test.exs
|
|
|
|
fixture: |
|
|
whichfizz = fn
|
|
(0, 0, _) -> "FizzBuzz"
|
|
(0, _, _) -> "Fizz"
|
|
(_, 0, _) -> "Buzz"
|
|
(_, _, n) -> n
|
|
end
|
|
|
|
fizzbuzz = fn (n) ->
|
|
whichfizz.(rem(n, 3), rem(n, 5), n)
|
|
end
|
|
|
|
[1, 2, "Fizz", 4, "Buzz", "Fizz", 7, 8, "Fizz", "Buzz"] = Enum.map(1..10, fizzbuzz)
|