Skip to content

Instantly share code, notes, and snippets.

{-# LANGUAGE GADTs #-}
module Main where
import Control.Monad
import Control.Monad.RWS.Strict
import Control.Monad.Trans.Error
import Control.Monad.Operational.Simple
import Prelude hiding (putChar, getChar)
import qualified System.IO as IO
!SLIDE
# 7章 最小高さ木の構築
!SLIDE
与えられた整数のリストが木の周縁となるような、葉にラベルがついた二分木のうち高さが最小のものを組み立てるという問題を考察する
@totem3
totem3 / test
Created December 17, 2014 20:20
!SLIDE
# FOO
Require Import Arith.
Require Import NOrder.
Lemma le_n_0_eq n : n <= 0 -> 0 = n .
intros.
symmetry.
induction n.
reflexivity.
apply False_ind.
apply (NPeano.Nat.nle_succ_0 n).
@totem3
totem3 / t.v
Created November 17, 2014 11:17
Goal forall (A : Prop), A -> A.
intros.
exact H.
Qed.
Require Import Arith.
Theorem plus_comm: forall (n m : nat), (n + m) = m + n.
intros.
induction m.
simpl.
@totem3
totem3 / Cask
Created November 13, 2014 00:06
(source gnu)
(source melpa)
(depends-on "ace-jump-mode")
(depends-on "anzu")
(depends-on "auto-complete")
(depends-on "autopair")
(depends-on "bind-key")
(depends-on "buffer-move")
(depends-on "cask")
@totem3
totem3 / apr.rb
Last active August 29, 2015 14:08
require 'formula'
class Apr < Formula
url 'http://apache.cs.utah.edu/apr/apr-1.5.1.tar.gz'
homepage 'http://apr.apache.org/'
sha1 '9caa83e3f50f3abc9fab7c4a3f2739a12b14c3a3'
def install
system "./configure", "--prefix=#{prefix}"
system "make"
require 'formula'
class AprUtil < Formula
url 'http://apache.cs.utah.edu//apr/apr-util-1.5.4.tar.gz'
homepage ''
sha1 '72cc3ac693b52fb831063d5c0de18723bc8e0095'
depends_on 'apr'
def install
<IfModule mod_proxy.c>
ProxyRequests Off
ProxyPass / http://localhost:8000/
ProxyPassReverse / http://localhost:8000/
</IfModule>
@totem3
totem3 / hello.c
Last active August 29, 2015 14:07
#include <stdio.h>
int main(int argc, char const* argv[])
{
printf("Hello World!\n");
return 0;
}