Skip to content

Instantly share code, notes, and snippets.

View miguel-vila's full-sized avatar

Miguel Vilá miguel-vila

View GitHub Profile
import Data.IORef
readAndPrint :: IORef Int -> IO ()
readAndPrint ioRef = do
n <- readIORef ioRef
print $ "ioRef = " ++ show n
main = do
ioRef <- newIORef 3
readAndPrint ioRef -- "ioRef 3"
import scalaz._
import Scalaz._
case class Cosa(str: String, f: Float, n: Int)
import scalaz.Order.orderBy
val orderByStr = orderBy { c: Cosa => c.str }
val orderByF = orderBy { c: Cosa => c.f }
val orderByN = orderBy { c: Cosa => c.n }
module Main where
main = ioA where
ioA = putStrLn "Hola"
ioB = putStrLn "Chao!"
scala> import scalaz.std.list.listInstance
import scalaz.std.list.listInstance
scala> import scalaz.Traverse
import scalaz.Traverse
scala> import scalaz.ValidationNel
import scalaz.ValidationNel
scala> import scalaz.Validation

Keybase proof

I hereby claim:

  • I am miguel-vila on github.
  • I am miguel (https://keybase.io/miguel) on keybase.
  • I have a public key ASDVH-1dpmGPCZPT_1EJkooBVho9_aE34wxXL6bNnceNNQo

To claim this, I am signing this object: