-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce about product
fucntion
#218
Comments
とのことですが、実際に実行してみたところ、エラーが出ます。 def solve(xs: List[int]) -> int:
return sum(sorted(map(lambda x: x + 1, xs))) 発生したエラー
これはコードが間違っているのでしょうか?それともシステムの問題なのでしょうか? |
システムの問題です。Jikka の既存の実装がバグっているのだと思います。 Jikka.Core.Convert.TypeInfer は core 言語上で型推論 (type inference) をする module です。 呼び出し元: エラーが @soraiemame よければこれの調査を任せたいです。どうですか? |
やってみます! |
@soraiemame とりあえず issue #222 を切っておきました。 |
Description / 説明
Rewrite rules to convert
sum
/modsum
to closed formulae are already implemented.For example, an expr
sum(sorted(map(lambda x: x + 1, xs)))
of Python becomessum(xs) + len(xs)
.Implementation:
https://github.com/kmyk/Jikka/blob/52299f06f7f8d96643198b2cff95fd873da9b371/src/Jikka/Core/Convert/CloseSum.hs#L42-L68
Rewrite rules for
product
/modproduct
are not fully implemented. We want to complete them.In concrete, please do followings:
[r| "sum/range" forall n. sum (range n) = n * (n - 1) /! 2 |]
)Current implementation:
https://github.com/kmyk/Jikka/blob/52299f06f7f8d96643198b2cff95fd873da9b371/src/Jikka/Core/Convert/CloseSum.hs#L70-L86
Motivation / 動機
because not implemented yet
The text was updated successfully, but these errors were encountered: