Skip to content

Instantly share code, notes, and snippets.

David Hazinski kaezarrex

Block or report user

Report or block kaezarrex

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Rubentxu / maybe.go
Created Sep 24, 2015
Implementing the Maybe monad in Golang
View maybe.go
package main
import (
type Maybe interface {
Return(value interface{}) Maybe
Bind(func(interface{}) Maybe) Maybe
signed0 / gist:2252148
Created Mar 30, 2012
Douglas Peucker
View gist:2252148
from math import sqrt
from itertools import islice, chain
def subtract_coords(a, b):
'''Returns a - b'''
return (a[0] - b[0], a[1] - b[1])
def dot_product(a, b):
return a[0] * b[0] + a[1] * b[1]
signed0 / gist:1731010
Created Feb 3, 2012
Lazy loding method decorator
View gist:1731010
class MyClass():
def config(self):
return {'yay': 'nay'}
You can’t perform that action at this time.