The $ notation is his own notation and I don't think there is an implementation that matches that exactly. You can create a variant type around the susp module in Moscow ML though, if that helps. I program in ocaml, so I lied, I'm not sure if you can, but being an ML flavor, I imagine the possibility almost certainly. So, something like this, in ocaml:
type 'a mylazy =
| Lazy of 'a Lazy.t
| Eager of 'a
This additional construct shouldn't affect the memoization that Lazy
gives you in casual use. But, if you are using lazy values you don't usually worry about the Eager
case and only have a lazy case utilizing the memoization that the modules provide, forcing the value each time without subsequent penalties.
(also, I used OCAML to work through Purely Functional Data Structures)