Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
"I'm in"

Jessica Kerr jessitron

🚀
"I'm in"
View GitHub Profile
@iainjreid
iainjreid / package-json.d.ts
Last active Feb 13, 2020
A Typescript type definition for NPM package files
View package-json.d.ts
export interface IPackageJSON extends Object {
readonly name: string;
readonly version?: string;
readonly description?: string;
readonly keywords?: string[];
@pithyless
pithyless / either.rb
Created Mar 27, 2012
Chaining Either for Ruby
View either.rb
# A chainable Either monad for Ruby
#
# Examples
#
# Either.right('s') >> proc { |s| Either.right(s + '-1') } >> proc { |s| Either.right(s + '-2') }
# #=> #<Either @left=nil, @right="s-1-2">
#
# Either.right('s') >> proc { |s| Either.left('error!') } >> proc { |s| Either.right(s + '-2') }
# #=> #<Either @left='error!', @right=nil>
#
You can’t perform that action at this time.