Skip to content

Instantly share code, notes, and snippets.

-- The meta-circular interpreter from section 5 of Reynolds's Definitional
-- Interpreters for Higher Order Programming Languages
-- (http://www.cs.uml.edu/~giam/91.531/Textbooks/definterp.pdf)
data EXP
= CONST Const
| VAR Var
| APPL Appl
| LAMBDA Lambda
| COND Cond
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
module Propositional where
import Prelude hiding (False, True)
import qualified Prelude
Priority Queues
═══════════════
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INSERT DEL-MIN MIN DEC-KEY DELETE MERGE
binary log n log n 1 log n log n n
binomial 1 log n 1 log n log n log n
Fibonacci 1 log n† 1 1† log n† log n
Pairing 1† log n† 1† 1† log n† 1†
Brodal-Okasaki 1 log n 1 1 log n 1
flags: {}
packages:
- location: '.'
- location:
git: https://github.com/ryantrinkle/reflex.git
commit: 784f9f79396ae713a03fc4d81f8a67b75d6ade1c # need a few package bumps not present in hackage release yet
extra-dep: true
- location:
git: https://github.com/ryantrinkle/reflex-dom.git
@reinh
reinh / gist:3726cdf10fce430b6e31
Last active September 15, 2015 21:22
A flowchart for understanding fixed points.
+--------------------+
| Do you understand |
| fixed points? <----+
+---------+----------+ |
| |
| NO |
| |
+---------v----------+ |
| Read a tutorial +----+
| about fixed points |
{-# LANGUAGE OverloadedStrings #-}
module CommandParser where
import Data.Attoparsec.ByteString.Char8
import Data.Attoparsec.Combinator
import Control.Applicative
import Data.ByteString
data Command = Retrieve | Delete | New deriving Show
_______________
< PLAY [gitlab] >
---------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
foo = bar
. bizz
. bazz
foo = bar
<> bizz
<> bazz
expr = term
@reinh
reinh / solarized.css
Created July 15, 2014 22:32
Updated Solarized style that justifies nicks and messages
span.messageRow {
}
span.messageRow span.date {
}
span.messageRow span.message {
}
span.message span.authorWrap {
[1,2,3] [] []
[2,3] [1] []
[3] [1] [2]
[3] [] [1,2]
[] [3] [1,2]
[1] [3] [2]
[1] [2,3] []
[] [1,2,3] []