Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add readme

  • Loading branch information...
commit 1872fe4355b202c4142a4bbdb29b67967e5d2a3b 1 parent 25b6d76
Anders Conbere authored
Showing with 22 additions and 0 deletions.
  1. +22 −0 README.mkd
22 README.mkd
View
@@ -0,0 +1,22 @@
+# Trying to make some semigroups
+
+I feel like I've gotten a step closer, but still not quite there.
+
+```scala
+
+import org.conbere.algebra.SemiGroup._
+
+object Algebra {
+ def main(args:Array[String]) = {
+ // this works great
+ val adder = optionSemiGroup[Int]
+ assert(Some(3) == adder(Some(1), Some(2)))
+
+ // this doesn't
+ // scala> Some(1) +| Some(2)
+ // <console>:11: error: could not find implicit value for parameter adder: org.conbere.algebra.SemiGroup[Some[Int]]
+ // Some(1) +| Some(2)
+ Some(1) +| Some(2)
+ }
+}
+```
Please sign in to comment.
Something went wrong with that request. Please try again.