mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 16:35:07 +03:00
c2da838584
closes #4568
40 lines
739 B
YAML
40 lines
739 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: make install PREFIX="{{prefix}}"
|
|
|
|
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)
|