Skip to content

Commit

Permalink
Add a comment about ordering in NodeOptions (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-martin authored Mar 1, 2024
1 parent 7478a69 commit 51f0f7a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Graphula/Node.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ import UnliftIO.Exception (Exception, throwIO)
-- > a1 <- node @A () mempty
-- > a2 <- node @A () $ edit $ \a -> a { someField = True }
-- > a3 <- node @A () $ ensure $ (== True) . someField
--
-- The Semigroup orders the operations from right to left. For example,
-- @'edit' z <> 'ensure' y <> 'edit' x@ first performs @'edit' x@, then fails if
-- the value does not satisfy assertion @y@, then performs @'edit' z@.
newtype NodeOptions a = NodeOptions
{ nodeOptionsEdit :: Kendo Maybe a
}
Expand Down

0 comments on commit 51f0f7a

Please sign in to comment.