Symbol | scalaz6 | scalaz7 |
---|---|---|
>>= | 19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type _ complist = | |
One : ('a -> 'b) -> ('a * 'b) complist | |
| Cons : ('a -> 'b) * ('b * 'c) complist -> ('a * 'c) complist | |
let rec clength : type a . a complist -> int = function | |
| One _ -> 1 | |
| Cons (_, xs) -> 1 + clength xs | |
let rec ccompose : type a b . (a * b) complist -> (a -> b) = function | |
| One f -> f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module type Monad = sig | |
type 'a m | |
val bind : 'a m -> ('a -> 'b m) -> 'b m | |
val return: 'a -> 'a m | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Test extends App { | |
val x = foo.Foo.privateX | |
println(x) | |
println(x.foo) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open String | |
module Nat = struct | |
type nat = Z | S of nat | |
let rec int_of_nat = function | |
| Z -> 0 | |
| S n -> 1 + int_of_nat n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scalaz._ | |
import Id.Id | |
import undo._ | |
import UndoT._ | |
import syntax.show._ | |
import syntax.monoid._ | |
import std.string._ | |
import std.anyVal._ | |
def combine[F[_, _], S, A](f: F[S, A])(implicit F: MonadState[F, S], S: Show[S], A: Show[A]) = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# /etc/rc.conf - Main Configuration for Arch Linux | |
# | |
# See 'man 5 rc.conf' for more details | |
# | |
DAEMONS=(@sensors) | |
# Storage | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scalaz._ | |
import Scalaz._ | |
val pf: Int => Option[Int] = PartialFunction.condOpt(_) { case 3 => 30; case 4 => 40 } | |
scala> List(1, 2, 3, 4).traverse(pf) | |
res0: Option[List[Int]] = None | |
scala> List(3, 4).traverse(pf) | |
res1: Option[List[Int]] = Some(List(30, 40)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package std | |
trait A { | |
class A(n: Int) | |
} | |
object a extends A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package scalaz.contrib | |
package spire | |
import _root_.spire.algebra | |
trait MonoidOps[F] extends SemigroupOps[F] { | |
def asSpire: algebra.Monoid[F] | |
def asScalaz: scalaz.Monoid[F] |