Skip to content

Instantly share code, notes, and snippets.

@jochasinga
jochasinga / fibonacci_closure.go
Created May 26, 2016 12:57 — forked from tetsuok/fibonacci_closure.go
An answer of the exercise: Fibonacci closure on a tour of Go
package main
import "fmt"
// Very naive answer.
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
n := 0
a := 0
@jochasinga
jochasinga / simple_chat.rs
Last active August 29, 2015 14:27 — forked from andelf/simple_chat.rs
Simple Socket Chat Server in Rust. (TcpListener, TcpStream, SharedChan, RWArc)
extern mod sync;
// str op trait
use std::str::StrSlice;
// for tcp listen
use std::io::{TcpListener, TcpStream};
use std::io::net::ip::SocketAddr;
// for trait
use std::io::{Listener, Writer, Acceptor, Buffer};
// for spawn
## When you begin working on a feature
Step 1: Update the main (demo) branch
git checkout demo
git pull origin demo
Step 2: Create a feature branch off of the main branch (demo)
git checkout -b my_feature_branch demo
Step 3: Record/Commit your work