Repository F# setup
open System
open System.IO
open System.Threading
open System.Threading.Tasks
open Axial
open Axial.Layers
open Axial.Console
open Axial.FileSystem
open Axial.Hosting
open Axial.Hosting.Browser
open Axial.Hosting.Node
open Axial.HttpClient
open Axial.PlatformService
open Axial.Process
open Axial.State
open Axial.Telemetry
open Axial.Telemetry.JavaScriptThe Flow CE
Use flow {} when later work depends on earlier success.
Suppose the block calls these functions:
let loadUser (id: UserId) : Flow<AppEnv, AppError, User> = ...
let auditUser (user: User) : Flow<AppEnv, AppError, unit> = ...
let greetUser (user: User) : Flow<AppEnv, AppError, string> = ...flow {
let! user = loadUser userId
do! auditUser user
return! greetUser user
}flow {
let! (user: User) =
(loadUser userId: Flow<AppEnv, AppError, User>)
do! (auditUser user: Flow<AppEnv, AppError, unit>)
return! (greetUser user: Flow<AppEnv, AppError, string>)
}
// Flow<AppEnv, AppError, string>Normal F# if, match, for, and while expressions work inside the computation expression.
Go Further
- Flow builder reference lists the values accepted by each computation-expression operation.
- Bind covers bind-site error assignment and mapping when the source error does not already match the workflow.
- Task and Async interop gives the detailed carrier and cancellation rules.

