I hereby claim:
- I am RyanGough on github.
- I am ryanwgough (https://keybase.io/ryanwgough) on keybase.
- I have a public key whose fingerprint is 76D7 9BF6 4DCC 47E5 FF68 8650 1246 5F3C 877B EED6
To claim this, I am signing this object:
| (ns lift-kata.core-test | |
| (:require [clojure.test :refer :all] | |
| [lift-kata.core :refer :all])) | |
| (deftest open-door-on-requested-floor | |
| (testing "Should open the doors if only request is current floor." | |
| (is (= {:doors :open :floor 0 :requests []} | |
| (lift-kata.core/next-lift-state {:doors :closed :floor 0 :requests[]}, | |
| [0]))))) |
| (ns checkout.core-test | |
| (:require [clojure.test :refer :all] | |
| [checkout.core :refer :all])) | |
| (deftest single-item | |
| (testing "scannng a single A item gives price 50" | |
| (is (= 50 (scan ["A"]))))) | |
| (deftest different-item | |
| (testing "scannng a single B item gives price 30" |
| -module (jobsort). | |
| -export ([sort/1,test/0]). | |
| sort(JobSpec) -> | |
| EdgesAndVertices = get_edges_and_vertices(string:tokens(JobSpec, "\r\n"), [], []), | |
| Graph = build_graph(EdgesAndVertices), | |
| case digraph_utils:is_acyclic(Graph) of | |
| true -> | |
| lists:reverse(digraph_utils:topsort(Graph)); |
I hereby claim:
To claim this, I am signing this object:
| function play (a) { | |
| return a.reduce(function(c,t,i) { | |
| if (t-a[i-1]<2) { | |
| c=(c+'').replace(/-.$/, '') | |
| c+='-' | |
| } else c+=',' | |
| return c+t | |
| }) | |
| } |