Skip to content

Commit

Permalink
jucier refs
Browse files Browse the repository at this point in the history
  • Loading branch information
vMaroon committed Jul 3, 2024
1 parent 678cf53 commit d767055
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Material/Tutorials/sml/refs.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,7 @@ fun memoizer_put (memo: (''a, 'b) memoizer) x y =

```sml
fun memoize (memo: (''a, 'b) memoizer) f x =
case (List.find (fn (x', _) => x = x') (!(#memory memo))) of
SOME (_, y') => y'
| NONE => (
let val y = f x in
memoizer_put memo x y;
y
end
);
```
<!-- .element: data-thebe-executable-sml data-language="text/x-ocaml" -->

Expand Down

0 comments on commit d767055

Please sign in to comment.