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:
" let mapleader='\' | |
" When using \b on normal mode, it will compile the | |
" project | |
nmap <LEADER>b :<C-u>make<CR> | |
" Close the QuickFix window just with the q | |
au FileType qf nnoremap <buffer> q :<C-u>cclose<CR> | |
" After compiling, open the QuickFix window if there |
module Test.Util.ArbitraryInstances where | |
import Data.List (intercalate) | |
import Control.Applicative ((<$>), (<*>), pure) | |
import Network.URI (URI(..), URIAuth(..), uriToString) | |
import Test.QuickCheck | |
newtype URIPair | |
= URIPair { fromPair :: (String, String) } | |
deriving (Show) |
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> |
import java.util.ArrayList; | |
// This is a min heap | |
public class Heap { | |
protected int[] data = new int[1000]; | |
public Heap() { | |
this.data[0] = 0; | |
} |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Control.Failure (Failure(..)) | |
import Control.Monad.Trans (MonadIO, liftIO, lift) | |
import Control.Monad.IO.Control (MonadControlIO) |
package main | |
import ( | |
// "fmt" | |
"fmt" | |
"strings" | |
"testing" | |
) | |
// type Greeter interface { |
(ns hystrix-hello-world.core | |
(:require | |
;; hystrix | |
[com.netflix.hystrix.core :as hystrix] | |
[hystrix-event-stream-clj.core :as hystrix-event] | |
;; http | |
[aleph.http :refer [start-http-server wrap-ring-handler]] | |
[clj-http.client :as http]) | |
(:import [com.netflix.hystrix |
I hereby claim:
To claim this, I am signing this object:
(ns rx.example.schedulers | |
(:require | |
[monads.core :refer [Monad] :as monad] | |
[clojure.core.match :refer [match]] | |
[disposables.core :as disposable] | |
[com.unbounce.treajure.io :as tio] | |
[rx.lang.clojure.core :as rx] | |
[clj-http.client :as http]) | |
(:import | |
[java.util.concurrent Executors] |
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 #-} |