Skip to content

Instantly share code, notes, and snippets.

View jooyunghan's full-sized avatar

Jooyung Han jooyunghan

View GitHub Profile
var noop = [];
function stream(arr){
if(arr.length === 0) return noop;
return cons(function (){return arr[0]}, function (){ return stream(arr.slice(1))})
}
function cons(head, tail){
return [head, tail];
}
@jooyunghan
jooyunghan / ant.go
Created March 1, 2016 08:34 — forked from anonymous/ant.go
Look and say sequence in Go using Chan/Goroutine
package main
import "fmt"
type genf func(chan<- uint8)
func gen(f genf) <-chan uint8 {
c := make(chan uint8)
go f(c)
return c
int[][] data = new int[3][3];
private void aiMove() {
Score s = minimax(null, true);
data[s.move.x][s.move.y] = COMPUTER;
}
static class Score {
Point move;
int score;
@jooyunghan
jooyunghan / about.md
Created August 29, 2011 08:11 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer