first commit.

This commit is contained in:
Linus Björnstam 2026-04-02 11:49:37 +02:00
parent 469de83cdc
commit 1ed8d0b479

30
Readme.md Normal file
View file

@ -0,0 +1,30 @@
# rprint - redirectable print
This emulates with-output-to-string from scheme in f# using AsyncLocal.
``` f-sharp
open Rprint.rprint
let sayHi name =
rprint "Hi, %s" name
rprintn "this prints like usual"
rprint "%s %d" "this uses a format string" 5
withOutputToString
(fun () -> rprint "this ends up in a string, and so does this"
sayHi "banana")
```
The source code is short enough that you should not need any documentation.
There might be async workflows where this does not do what you expect. You have been warned.
Licensed under the 0-clause BSD license.
```
Copyright (C) 2026 by Linus Björnstam <linus.internet@fastmail.se>
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
```