My own corner of monopam
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocaml-tdm: bind README example as a function

The block referenced [kvn_text] free, mixed [Printf.printf] /
[Fmt.epr]. Wrap as [report kvn_text = ...], use [Fmt.pr] / [Fmt.epr],
and add [fmt] to the mdx libraries.

+12 -14
+10 -10
ocaml-tdm/README.md
··· 31 31 ## Usage 32 32 33 33 ```ocaml 34 - match Tdm.of_string kvn_text with 35 - | Ok tdm -> 36 - Printf.printf "Participants: %s -> %s\n" 37 - tdm.metadata.participant_1 tdm.metadata.participant_2; 38 - List.iter (fun obs -> 39 - Printf.printf " %s: %s = %.6f\n" 40 - obs.Tdm.epoch obs.Tdm.keyword 41 - obs.Tdm.value 42 - ) tdm.observations 43 - | Error e -> Fmt.epr "%a\n" Tdm.pp_error e 34 + let report kvn_text = 35 + match Tdm.of_string kvn_text with 36 + | Ok tdm -> 37 + Fmt.pr "Participants: %s -> %s@." tdm.metadata.participant_1 38 + tdm.metadata.participant_2; 39 + List.iter 40 + (fun obs -> 41 + Fmt.pr " %s: %s = %.6f@." obs.Tdm.epoch obs.Tdm.keyword obs.Tdm.value) 42 + tdm.observations 43 + | Error e -> Fmt.epr "%a@." Tdm.pp_error e 44 44 ``` 45 45 46 46 ## API Overview
+2 -4
ocaml-tdm/dune
··· 3 3 (flags :standard %{dune-warnings}))) 4 4 5 5 (mdx 6 - (files 7 - README.md 8 - ) 9 - (libraries tdm)) 6 + (files README.md) 7 + (libraries tdm fmt))