Skip to content

Instantly share code, notes, and snippets.

View CAFxX's full-sized avatar

Carlo Alberto Ferraris CAFxX

View GitHub Profile
@CAFxX
CAFxX / intern.go
Last active September 26, 2018 01:23 — forked from karlseguin/intern.go
String interning in Golang
package intern
import (
"sync"
)
type Pool struct {
sync.RWMutex
lookup map[string]string
}
@CAFxX
CAFxX / stack.go
Last active August 29, 2015 14:23 — forked from bemasher/stack.go
package main
import (
"fmt"
)
type Stack struct {
top *Element
size int
}