エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Functional Thinking » Memoization in GHC
記事へのコメント2件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Functional Thinking » Memoization in GHC
Memoization is a well known and well studied optimization technique. In Haskell, the purely funct... Memoization is a well known and well studied optimization technique. In Haskell, the purely functional semantics allows function applications to reuse previous invocations, by looking up a cache or memo table. Take the classical fib function. fib :: Int -> Int fib n = if n < 2 then 1 else fib (n-1) + fib (n-2) There are many calls to fib with the same argument. But is there a way of memoizing thi