I hereby claim:
- I am themattchan on github.
- I am mattchan (https://keybase.io/mattchan) on keybase.
- I have a public key whose fingerprint is 43B9 F9E7 C56E D3BF 1063 7CFC 013F 7CA0 4EBC 8427
To claim this, I am signing this object:
# -*- mode: snippet; require-final-newline: nil -*- | |
# name: homework-sty | |
# key: homework | |
# binding: direct-keybinding | |
# -- | |
\documentclass[10pt,letterpaper]{article} | |
\usepackage[T1]{fontenc} | |
\usepackage[parfill]{parskip} % line break instead of indentation | |
\usepackage[margin=1in]{geometry} | |
\usepackage{float} % use attribute [H] to force images to stay where they should be |
import edu.princeton.cs.algs4.*; | |
import java.util.*; | |
public class KdTree { | |
private abstract class Node implements TreeApply { | |
protected Point2D point; | |
public abstract void apply (TreeFunction function); | |
} | |
private interface TreeFunction { |
I hereby claim:
To claim this, I am signing this object:
#! /usr/bin/runhaskell | |
{-# LANGUAGE FlexibleContexts #-} | |
module Lib where | |
import Diagrams.Prelude | |
import Diagrams.Backend.PGF.CmdLine | |
pipeline :: Diagram PGF | |
pipeline = foldr1 (|||) labelledBlocks | |
where |
gnuindent -kr -l80 -ut -i8 -ts8 -sob *.c *.h | |
# cribbed from scripts/Lindent from kernel | |
gnuindent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1 |
{-# LANGUAGE FlexibleInstances #-} | |
-- | Fun with typeclasses | |
module Box where | |
import Prelude hiding (Functor(..), Applicative(..), Monad(..), Monoid(..), (.)) | |
infixr 6 <> | |
-------------------------------------------------------------------------------- | |
-- * Parametricity and typeclasses | |
-- see https://www.schoolofhaskell.com/school/starting-with-haskell/introduction-to-haskell/5-type-classes |
Require Import Coq.Lists.List. | |
Open Scope bool_scope. | |
(* This is a direct definition of CGTs, using just one inductive type | |
instead of a pair of mutually-inductive types *) | |
Inductive game := Game { | |
left_moves : list game; | |
right_moves : list game |
{-# LANGUAGE | |
DataKinds | |
, TypeApplications | |
, TypeFamilies | |
, TypeOperators | |
, TypeInType | |
, KindSignatures | |
, ExistentialQuantification | |
, InstanceSigs | |
, ScopedTypeVariables |
{-# LANGUAGE ExistentialQuantification, RankNTypes #-} | |
module Main where | |
{-@ LIQUID "--higherorder" @-} | |
import Language.Haskell.Liquid.ProofCombinators | |
import Data.Functor.Const | |
import Data.Functor.Identity | |
type Lens s t a b = forall f. Functor f => (a -> f b) -> (s -> f t) |
{-# LANGUAGE DeriveFunctor #-} | |
import Control.Arrow ((&&&)) | |
import Data.Bifunctor | |
-- Recursion Schemes for Dynamic Programming | |
-- Kabanov and Vene, Mathematics for Program Construction 2006 | |
-- Basic stuff | |
newtype Mu f = In { out :: f (Mu f) } |