Skip to content

Instantly share code, notes, and snippets.

View d-plaindoux's full-sized avatar

Didier Plaindoux d-plaindoux

View GitHub Profile
@d-plaindoux
d-plaindoux / signature.py
Last active August 29, 2015 14:04
Simple type specification in Python
#
# Simpla and Naive type checker ...
#
import inspect
class TypeCheckError(Exception):
pass
@d-plaindoux
d-plaindoux / peano's integer
Last active August 29, 2015 13:57
Denotate Peano's integer addition using Golang - Kind of pattern matching based on types only
package main
import "fmt"
type Peano interface { isPeano() }
// Zero
type Zero struct {}
func (z Zero) isPeano() {}