Skip to content

Commit

Permalink
docs: Add basic imports in first example
Browse files Browse the repository at this point in the history
  • Loading branch information
Iltotore committed Jul 12, 2021
1 parent 853c297 commit c1722d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ This syntactic sugar allows the user to create more readable constraints.
Example of a constraint alias:

```scala
//This is mainly implicit functions/instances but if you prefer without star import, you can specify them.
import iron.*, constraint.*, numeric.constraint.{given, Greater}

type >[A, B] = A ==> Greater[B]

def log(x: Double > 0d): Refined[Double] = x.map(Math.log)
Expand Down

0 comments on commit c1722d8

Please sign in to comment.