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
;; Clojure 1.5.1 | |
=> 1 | |
1 | |
=> (require '[clojure.core.reducers :as r]) | |
nil | |
=> (use 'clojure.repl) | |
nil | |
=> (doc r/fold) | |
------------------------- | |
clojure.core.reducers/fold |
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
;; the backup bot where my real one failed | |
;; function name is ben | |
(ns tron.bots | |
(:require [tron.core :as tron])) | |
(defn up [[x y]] | |
[x (dec y)]) | |
(defn down [[x y]] |
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
module Parser where | |
data Token = Open_object | Close_object | Open_array | Close_array | List_delim | | |
Assign_delim | Quote | String_literal String deriving (Show, Eq, Read) | |
data JsonElement = FullJsonArray [JsonElement] | StringValue String deriving (Show, Eq, Read) | |
tokens :: [(Char, Token)] | |
tokens = [ | |
('{', Open_object), |