I hereby claim:
- I am nhessler on github.
- I am nhessler (https://keybase.io/nhessler) on keybase.
- I have a public key whose fingerprint is D0EE 20DF 35CD B2DD 86FF 3102 EEBB 7FA1 73C4 BA4D
To claim this, I am signing this object:
defmodule ElixirBaseball.Game do | |
def play_ball do | |
IO.puts inspect(play_inning([], 0, 0)) | |
end | |
def play_inning(top_of_inning, _, _) when length(top_of_inning) < 9 do | |
bottom_of_inning = [get_inning | top_of_inning] | |
play_inning(bottom_of_inning, | |
total_score(bottom_of_inning, :home), | |
total_score(bottom_of_inning, :away)) |
$depth = 0 | |
at_exit { p depth: $depth } | |
def record_depth | |
$depth = caller.length-1 if caller.length-1 > $depth | |
end | |
require 'binding_of_caller' | |
module Torc | |
def torc(*args) |
# Conway's Game of Life | |
# 2015-09-18 | |
# by | |
# Nathan Hessler https://twitter.com/spune | |
# Adam Bachman https://twitter.com/abachman | |
# at Ruby DCamp 2015 http://rubydcamp.org/ | |
# awesome test library | |
def assert(value) | |
if !value |
require 'sinatra/base' | |
require 'minitest/autorun' | |
require 'minitest/spec' | |
require "rack/test" | |
require 'nokogiri' | |
class MyApp < Sinatra::Base | |
enable :inline_templates | |
get '/users/:id' do |
I hereby claim:
To claim this, I am signing this object:
[grandpa, father, son,].inject(nil) do |parent, child| | |
child.parent = parent | |
child | |
end |