diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..e65c56b --- /dev/null +++ b/Readme.md @@ -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 + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. + +```