exercism / exercism/elixir-analyzer

Allow for alternative erlang solutions in `captains-log`

未關閉
#340 5 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
x:action/improve
主要語言
Elixir
星號
33
分支
33
PR 合併指標
30 天內沒有已合併 PR

描述

Given that the main focus of this exercise is to use erlang libaries, it feels strange to receive analyzer errors for the following two solutions:

`random_ship_registry/0` (prompts to use `Enum.random/1`):
```elixir
def random_ship_registry_number() do
digits = :rand.uniform(9000) + 999

"NCC-#{digits}"
end
```

`format_stardate/1` (prompts to use `:io_lib.format("~.1f", [stardate]) |> to_string()`):
```elixir
def format_stardate(stardate) do
stardate
|> :erlang.float_to_binary([{:decimals, 1}])
end
```

Would it make sense to have the analyzer allow one or both of these alternate solutions, since they are still using erlang?

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。