This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For a function that takes two arguments, return equivalent | |
// function with argument order reversed. | |
// | |
// (Like "flip" in Haskell prelude) | |
func flip<A, B, T>(f: (A, B) -> T) -> (B, A) -> T { | |
return { (b: B, a: A) -> T in return f(a, b) } | |
} | |
// Examples |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is just a scratchpad after I hacked what I needed in an irb session | |
require 'octokit' | |
Octokit.configure do |c| | |
c.login = 'searls' | |
c.password = 'c0d3b4ssssss!' | |
end | |
client = Octokit::Client.new | |
repos = client.repos #Note, for an org's repos, see `client.orgs.first.rels[:repos].get.data` |