Skip to content

Commit

Permalink
Merge branch 'main' of github.com:propensive/wisteria
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Jul 24, 2024
2 parents f8cb96b + 954abc4 commit 8fa3d0b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,12 +478,16 @@ producer typeclass results.

Here is an example usage:

```scala
```amok
syntax scala
highlight [InputType..flatMap This is a polymorphic `bind` function
highlight [Monadic..(_) This is a polymorphic `pure` function
##
object Parser extends ProductDerivation[Parser]:
inline def join[DerivationType <: Product: ProductReflection]: Parser[DerivationType] = input =>
constructWith[DerivationType, Either]
([InputType, OutputType] => _.flatMap, // bind
[MonadicType] => Right(_), // pure
([InputType, OutputType] => _.flatMap,
[MonadicType] => Right(_),
[FieldType] => context => context.parse(input))
```

Expand Down

0 comments on commit 8fa3d0b

Please sign in to comment.