StringBuffer 1.0.2
dotnet add package StringBuffer --version 1.0.2
NuGet\Install-Package StringBuffer -Version 1.0.2
<PackageReference Include="StringBuffer" Version="1.0.2" />
paket add StringBuffer --version 1.0.2
#r "nuget: StringBuffer, 1.0.2"
// Install StringBuffer as a Cake Addin #addin nuget:?package=StringBuffer&version=1.0.2 // Install StringBuffer as a Cake Tool #tool nuget:?package=StringBuffer&version=1.0.2
StringBuffer
An F# computation expression for writing code with code
Builds
NuGet
Package | Stable | Prerelease |
---|---|---|
StringBuffer |
Using
Install the latest version from https://www.nuget.org/packages/StringBuffer/
Then use stringBuffer
and indent
to write your code that writes code.
stringBuffer {
"let square x ="
indent {
"x * x"
}
}
stringBuffer
and indent
can both be nested in each other and will correctly produce output indented as expected.
let namespaces = seq {
"System"
"System.IO"
}
let formattedCode = stringBuffer {
namespaces |> Seq.map (fun ns -> "open " + ns)
""
"module MyModule"
indent {
"let LifeUniverseAndEverything () ="
indent {
"42"
}
}
}
open System
open System.IO
module MyModule
let LifeUniverseAndEverything () =
42
Developing
Make sure the following requirements are installed on your system:
- dotnet SDK 6.0 or higher
or
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- FSharp.Core (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
## [1.0.2] - 2024-11-15
[1.0.2]: https://github.com/simon-reynolds/StringBuffer//compare/v1.0.1...v1.0.2
### Fixed
- `indent` computation expression now directly implements methods such as `_.Zero()` instead of relying on member being visible from base computation expression builder