<commit_before>elm-memo
========

Most basic memoization functionality.

If you have a function `fun : Int -> Int -> Bool` that is expensive to
compute, and you know you are going to repeatedly need values of that
function with first argument `100` and second argument either between
`1` and `10` or between `30` and `40`, you can do:

```elm
memoized : Memo.Function Int Bool
memoized =
  Memo.memo (fun 100) ([1..10] ++ [30..40])
```

and later use `Memo.apply memoized 5`, `Memo.apply memoized 35`,
`Memo.apply memoized 35`, etc.<commit_msg>added to README<commit_after>elm-memo
========

Most basic memoization functionality.

If you have a function `fun : Int -> Int -> Bool` that is expensive to
compute, and you know you are going to repeatedly need values of that
function with first argument `100` and second argument either between
`1` and `10` or between `30` and `40`, you can do:

```elm
memoized : Memo.Function Int Bool
memoized =
  Memo.memo (fun 100) ([1..10] ++ [30..40])
```

and later use `Memo.apply memoized 5`, `Memo.apply memoized 35`,
`Memo.apply memoized 35`, `Memo.apply memoized 5`, `Memo.apply
memoized 35`, etc.

No recomputation will take place, i.e., each of `fun 100 5` and `fun
100 35` will be computed only once. Also, only results that are
actually needed will be computed, so in the example only `fun 100 5`
and `fun 100 35` will be computed at all, no `fun 100 1` or any others
in the range.
{'fraction_non_alphanumeric': 0.11686494051784464, 'fraction_numerical': 0.052484254723582924, 'mean_word_length': 4.125448028673835, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7400405', 'n_tokens_mistral': 514, 'n_tokens_neox': 445, 'n_words': 216}