Skip to content

Commit

Permalink
applied correct tut settings
Browse files Browse the repository at this point in the history
  • Loading branch information
wonk1132Simple committed Oct 20, 2016
1 parent 848ba63 commit 9dc7cdc
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions docs/src/main/tut/semigroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,32 +89,24 @@ instance defined for `None` or `Some`--you will get errors if you attempt to com
`Some` or `None` instance:

```tut:book
import cats.implicits._
> import cats.implicits._
> val someInstance = Some(1)
> val noneInstance = None
> val result = someInstance |+| noneInstance
error: value |+| is not a member of Some[Int]
someInstance(1) |+| noneInstance
^
val someInstance = Some(1)
val noneInstance = None
```
```tut:fail
val result = someInstance |+| noneInstance
```

whereby telling the compiler your vals are `Option` instances succeeds:


```tut:book
import cats.implicits._
> import cats.implicits._
> val optionInstanceSome : Option[Int] = Some(1)
> val optionInstanceNone : Option[Int] = None
> val result = optionInstanceSome |+| optionInstanceNone
result: Option[Int] = Some(1)
val optionInstanceSome : Option[Int] = Some(1)
val optionInstanceNone : Option[Int] = None
val result = optionInstanceSome |+| optionInstanceNone
```

N.B.
Expand Down

0 comments on commit 9dc7cdc

Please sign in to comment.