sharkdp / numbat

A statically typed programming language for scientific computations with first class support for physical dimensions and units
https://numbat.dev
Apache License 2.0
1.26k stars 53 forks source link

Add @example decorator #503

Closed sharkdp closed 1 month ago

sharkdp commented 3 months ago

We could add a @example(…) decorator for function definitions. This way, we could show exemplary usage of a function. For the documentation, we would (1) run this through the Numbat interpreter and also show the result; and (2) show a "try this" link to https://numbat.dev