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
Require Import Coq.Arith.Arith. | |
Section predicated_list. | |
Variable A : Type. | |
Variable bin_rel : A -> A -> Prop. | |
Hypothesis bin_rel_trans : forall a b c : A, bin_rel c b -> bin_rel b a -> bin_rel c a. | |
Set Implicit Arguments. |
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
CREATE TYPE _weighted_avg_fraction | |
AS (num double precision, denom double precision); | |
CREATE OR REPLACE FUNCTION _weighted_avg_step (acc _weighted_avg_fraction, | |
val anyelement, pond anyelement) RETURNS _weighted_avg_fraction AS $$ | |
BEGIN | |
RETURN (acc.num + val * pond, acc.denom + pond); | |
END; | |
$$ LANGUAGE plpgsql; |
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
(defproject name-with-dashes "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.4.0"]] | |
:main name-with-dashes.core) |
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
[alias] | |
st = status | |
br = branch | |
co = checkout | |
ci = commit | |
[user] | |
name = Thomas Feron | |
email = /email/ | |
[color] | |
branch = auto |
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
class Monad | |
attr_reader :value | |
def bind(f) | |
raise "not implemented" | |
end | |
def self.return(v) | |
self.new v | |
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
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
data Confidence = High | Medium | Low deriving (Show, Eq) | |
data Dataset :: Confidence -> * -> * where | |
Dataset :: [a] -> Dataset c 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
import Control.Monad | |
import Control.Monad.Identity | |
import Control.Monad.Trans | |
import Control.Monad.Writer.Lazy | |
data Step | |
= Action String | |
| Assertion Bool String | |
deriving (Show, Eq) |
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
;; Packages required : | |
;; jujube-theme | |
;; haskell-mode | |
;; ghc | |
(require 'package) | |
(add-to-list 'package-archives | |
'("marmalade" . | |
"http://marmalade-repo.org/packages/")) | |
(package-initialize) |
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 parser from "./nonSequentialActions.js" | |
function generateDocumentation (parser) { | |
switch (parser.action) { | |
case "pure": | |
return null | |
case "stringField": | |
return { [parser.key]: "string" } |
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 readline from "readline-sync" | |
// Side effects | |
class EffectfulImplementation { | |
getUserInput () { | |
return readline.question("> ") | |
} | |
listTodoItems () { |
OlderNewer