Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ndreynolds
ndreynolds / README.md
Last active August 29, 2015 14:16
Zug Simulator

Zug Simulator

In this exercise, we'll model the behavior of an U-Bahn or S-Bahn train.

Given a route which provides stations (just strings), the train's current station, and whether or not it's traveling in reverse (i.e., from the last stop to the first stop), the train should complete the route in the correct direction.

When the train's complete_route method is called, it should print a summary

; doll_smuggler in Clojure
(defstruct doll :ident :weight :value)
(def dolls [
(struct doll "luke" 9 150)
(struct doll "anthony" 13 35)
(struct doll "candice" 153 200)
(struct doll "dorothy" 50 160)
(struct doll "puppy" 15 60)

Keybase proof

I hereby claim:

  • I am ndreynolds on github.
  • I am ndreynolds (https://keybase.io/ndreynolds) on keybase.
  • I have a public key ASABbioTmvJdreU-G5RCMtJePRHzxByI-FPGCJwmq9BydAo

To claim this, I am signing this object:

@ndreynolds
ndreynolds / components.actions-test.js
Last active July 12, 2017 09:40
Action Playground
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
clickWithClosureAction() {
this.attrs.onClickWithClosureAction(); // or this.get('onClickWithClosureAction')()
},
clickWithSendAction() {
this.sendAction('onClickWithSendAction');
},