I hereby claim:
- I am roman on github.
- I am romanandreg (https://keybase.io/romanandreg) on keybase.
- I have a public key ASAvDKNxvV3MbARSw0PrDLl-EggvvoUXWuOeXOm1igAWbQo
To claim this, I am signing this object:
use std::sync::{Condvar, Mutex}; | |
pub struct MVar<T> { | |
locked_value: Mutex<Option<T>>, | |
empty_cond: Condvar, | |
full_cond: Condvar, | |
} | |
// Methods of MVar that need the Clone type constraint | |
impl<T> MVar<T> |
package main | |
import ( | |
// "fmt" | |
"fmt" | |
"strings" | |
"testing" | |
) | |
// type Greeter interface { |
I hereby claim:
To claim this, I am signing this object:
In this example we are using both *TypeFamilies* and *ConstraintKinds* to create a monadic | |
interface that keeps track of valid state transitions. | |
This is an evolution from @pittma experiments from the #haskell channel on the Functional Programming slack | |
> {-# LANGUAGE GADTs #-} | |
> {-# LANGUAGE DataKinds #-} | |
> {-# LANGUAGE StandaloneDeriving #-} | |
> {-# LANGUAGE MultiParamTypeClasses #-} | |
> {-# LANGUAGE RankNTypes #-} |
{-# START_FILE README.md #-} | |
# {{name}} | |
> Description of what this library does | |
## Table Of Contents | |
* [Raison d'etre](#raison-detre) | |
* [Library Usage](#library-usage) | |
* [Installation](#installation) | |
* [Development Notes](#development) |
module Main where | |
import Control.Applicative | |
import Control.Monad | |
import Data.List (foldl') | |
import qualified Data.Sequence as Seq | |
import qualified Data.Vector (freeze) | |
import qualified Data.Vector.Unboxed as V | |
import qualified Data.Vector.Unboxed.Mutable as VM |
module Main where | |
import Data.List (sort, sortBy) | |
import Control.Applicative | |
import Control.Monad (forM, replicateM_) | |
import Data.Set (Set) | |
import qualified Data.Set as Set | |
import qualified Data.Sequence as Seq | |
import qualified Data.Vector (freeze) | |
import qualified Data.Vector.Unboxed as V |
module Main where | |
import Control.Applicative | |
import Control.Monad (forM, replicateM_) | |
import qualified Data.Vector (freeze) | |
import qualified Data.Vector.Unboxed as V | |
import qualified Data.Vector.Unboxed.Mutable as VM | |
mkPolygonVector :: IO (V.Vector Int) |
(ns util.monads.free | |
(:require [monads.core :refer :all] | |
[monads.types :as types] | |
[clojure.core.match :refer [match]] | |
[clojure.algo.generic.functor :refer [fmap]])) | |
(defrecord Free [type functor-value]) | |
(defn pure [val] |