title: How to create semigroup for Boolean when using scalaz?
body: <p>I am using scalaz for some validation, and somewhere in code there are boolean conditions. A sample is shown below:</p>
  
  <pre><code>import scalaz._, std.AllInstances._
  
  object Temporary {
  
    def validate(x: Int): scalaz.Validation[List[String], Boolean] = {
      try {
        if (x &lt; 10) {
          scalaz.Success(true)
        } else {
          throw new RuntimeException("why oh why")
        }
      } catch {
        case e: Throwable =&gt; scalaz.Failure(List(e.getMessage))
      }
    }
  
  
    def main(args: Array[String]) {
      val x = validate(1) +++ validate(10)
      println(x)
  
      val y = List(1,2,4,10).map(validate(_)).reduce(_ +++ _)
      println(y)
    }
  
  }
  </code></pre>
  
  <p>I am getting following compilation errors.</p>
  
  <pre><code>Error:(21, 25) could not find implicit value for parameter M1: scalaz.Semigroup[Boolean]
      val x = validate(1) +++ validate(10)
                          ^
  </code></pre>
  
  <p>I cant figure out how to fix this error. Any pointers?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Thanks to the answer from @Travis Brown, here is what fixed it for this example. I added these two lines within the object </p>
  
  <pre><code>  import scalaz.Semigroup, scalaz.std.anyVal.booleanInstance.conjunction
    implicit val booleanSemigroup: Semigroup[Boolean] = conjunction
  </code></pre>
  
  <p>And now it gives correct validations:</p>
  
  <pre><code>Failure(List(why oh why))
  Failure(List(why oh why))
  </code></pre>
  
  <p>So cool!</p>