Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/FSharpPlus/Builders.fs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,21 @@ module GenericBuilders =
static member ($) (Idiomatic, Ii) = id
let inline idiomatic a b = (Idiomatic $ b) a

/// <summary>
/// Marks the beginning of an idiom bracket (applicative style).
/// </summary>
/// <Remarks>
/// Use Ii to mark the end of the idiom bracket.
/// </Remarks>
let inline iI x = (idiomatic << result) x

/// <summary>
/// Marks the end of an idiom bracket (applicative style).
/// </summary>
/// <Remarks>
/// Use iI to mark the beginning of the idiom bracket.
/// </Remarks>
let Ii = Ii
type Idiomatic with static member inline ($) (Idiomatic, Ji) = fun xii -> join xii
type Idiomatic with static member inline ($) (Idiomatic, J ) = fun fii x -> (Idiomatic $ x) (join fii)

Expand Down
Loading