Skip to content

Instantly share code, notes, and snippets.

View whostolebenfrog's full-sized avatar

Ben Griffiths whostolebenfrog

View GitHub Profile
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),
@whostolebenfrog
whostolebenfrog / bots.clj
Last active December 19, 2015 00:19 — forked from cgrand/bots.clj
;; 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]]
;; Clojure 1.5.1
=> 1
1
=> (require '[clojure.core.reducers :as r])
nil
=> (use 'clojure.repl)
nil
=> (doc r/fold)
-------------------------
clojure.core.reducers/fold