Skip to content

Instantly share code, notes, and snippets.

View k-ohtani-is-deleting's full-sized avatar

Kazunori Otani k-ohtani-is-deleting

  • VOYAGE GROUP
  • Shibuya, Tokyo
View GitHub Profile
class Hoge {
static void hoge() {
assertThat(
event(“TDD Boot Camp”),
goUpTo(8f).byEleveter);
}
}
@k-ohtani-is-deleting
k-ohtani-is-deleting / Makefile
Created February 15, 2013 13:16
make smile
smile: ☺
☺:
echo ☺
all: test
test:
env gosh game-of-life-test.scm
(define (assert-true actual message)
(if actual #t (raise message)))
(assert-true #t "would returns #t")
(assert-true #f "would throws error")
(define (assert-equals expected actual determiner)
(assert-true (determiner expected actual)
(string-append "expected " (x->string expected) ", but got " (x->string actual))))
(assert-equals 1 1 =) ; => #t
(assert-equals 1 2 =) ; throws error
@k-ohtani-is-deleting
k-ohtani-is-deleting / 2012-10-31.scm
Created October 31, 2012 05:01
SICP読書会 2012-10-31
; 2.28
(define x (list (list 1 2) (list 3 4)))
(fringe x) ; (1 2 3 4)
(fringe (list x x)) ; (1 2 3 4 1 2 3 4)
(define (fringe t)
(cond ((null? t) '())
((not (pair? t)) (list t))
(else (append (fringe (car t)) (fringe (cdr t))))))
(define (append list1 list2)
use strict;
use warnings;
use Test::More qw/no_plan/;
my $key = '1,2,';
my ($a1, $a2, $a3) = split /,/o, $key;
is($a1, '1');