I hereby claim:
- I am jtompkins on github.
- I am jtompkins (https://keybase.io/jtompkins) on keybase.
- I have a public key ASCxAEngryCvn9I-QmqIvdm5Y5HCGwFB9sRDu0oDABDy8Ao
To claim this, I am signing this object:
class LinkedList { | |
static fromString(str) { | |
return [...str].reduce((acc, next) => acc.shift(next), new LinkedList()) | |
} | |
constructor(initial) { | |
this.head = initial ? new ListNode(initial) : null | |
} | |
shift(value) { |
Test |
I hereby claim:
To claim this, I am signing this object:
require 'rbdux' | |
Rbdux::configure do | |
store Rbdux::Stores::MemoryStore.with_state do | |
visibility: :hide_completed, | |
todos: [] | |
end | |
actions do | |
define :toggle_visibility |
class ARepository | |
extend Codependent::Helper | |
singleton :a_repository, in_scope: :a_test_scope do | |
with_constructor { ARepository.new } | |
depends_on :logger, :another_repository | |
end | |
attr_accessor :logger, :another_repository | |
end |
require_relative '../../lib/action' | |
require_relative '../../lib/store' | |
Todo = Struct.new(:text, :completed) | |
class CommandProcessor | |
def parse_command(text) | |
command_array = text.split(' ') | |
case command_array[0] |
# A weird, mostly ugly, kind of functional-programming-ish solution | |
# to RubyQuiz #117: | |
# http://rubyquiz.com/quiz117.html | |
STATES = { | |
vacuum: " ", | |
vapor: ".", | |
frost: "*" | |
} |
I hereby claim:
To claim this, I am signing this object:
<script type="text/javascript"> | |
function createColumn() { | |
return $('<div class="column"></div>'); | |
} | |
function createBlock() { | |
return $('<div class="block"></div>'); | |
} | |
function isLarge(tile) { |
class Messenger | |
constructor: -> | |
@subs = {} | |
register: (type, caller, func) => | |
return unless type? and caller? and func? | |
@subs[type] = [] unless @subs[type]? | |
existing = null |