This file contains 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
(defn create-nfg-strategy-list | |
[strategies] | |
(->> strategies | |
(map (fn [strat] | |
(add-braces (str/join " " (doall (map add-doublequotes strat)))) | |
;; (->> strat | |
;; (map add-doublequotes) | |
;; (str/join " ") | |
;; add-braces) | |
)) |
This file contains 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
(defmacro mget-at [m at] | |
`(mget ~m ~@at)) | |
(defn payoffs-at [game at] | |
(let [payoffs (:payoffs game)] | |
(map #(mget-at % at) payoffs))) | |
CompilerException java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol, compiling:(/private/var/folders/j2/zvt92c1s39d_0kdmhrhbgtkm0000gn/T/form-init602105178864433939.clj:3:11) |
This file contains 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
(message "THE USER CONFIG FILE WAS LOADED") | |
;; Configure: Add org-mode-dir/lisp/ to Emacs load-path | |
(add-to-list 'load-path "~/.emacs.d/plugins/org-8.2.5c/lisp") | |
(require 'org) | |
(require 'ox-publish) | |
;; Incise uses the new org-mode Export Framework (introduced in 8.0) See more | |
;; information here: |
This file contains 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
(setq org-publish-project-alist | |
'( | |
("incise-org" | |
:base-directory "~/Development/clojure/incise-org-parser/resources/org/" | |
:base-extension "org" | |
:publishing-directory "~/Development/clojure/incise-org-parser/public/" | |
:recursive t | |
:publishing-function org-html-publish-to-html | |
:headline-levels 2 | |
:auto-preamble t) |
This file contains 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
(def sudoku-board [[5 3 0 0 7 0 0 0 0] | |
[6 0 0 1 9 5 0 0 0] | |
[0 9 8 0 0 0 0 6 0] | |
[8 0 0 0 6 0 0 0 3] | |
[4 0 0 8 0 3 0 0 1] | |
[7 0 0 0 2 0 0 0 6] | |
[0 6 0 0 0 0 2 8 0] | |
[0 0 0 4 1 9 0 0 5] | |
[0 0 0 0 8 0 0 7 9]]) |
This file contains 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
(define-generic-mode 'ebnf-mode | |
'(("(*" . "*)")) | |
'("=" ":" ":=" "::=") | |
'( | |
("^[^ \t\n][^=]+" . font-lock-variable-name-face) | |
("<" . font-lock-constant-face) | |
(">" . font-lock-constant-face) | |
("['\"].*?['\"]" . font-lock-string-face) | |
("\\[\\|\\]\\|{\\|}\\|(\\|)\\||\\|,\\|;" . font-lock-type-face) | |
("\\?" . font-lock-builtin-face) |
This file contains 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
user> (defmacro fundef [a b] | |
`(defn ~(symbol (str "plus-" a "-" b)) [arg#] (+ ~a ~b arg#))) | |
#'user/fundef | |
user> (fundef 1 2) | |
#'user/plus-1-2 | |
user> (plus-1-2 3) | |
6 | |
user> (map #(fundef %1 %2) (range 3) (range 3)) | |
(#'user/plus-p1__10068#-p2__10069# #'user/plus-p1__10068#-p2__10069# #'user/plus-p1__10068#-p2__10069#) | |
user> (plus-0-0 1) |
This file contains 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
(ns lein-plz-nicknames | |
"Tiny script to check for additional projects discovered by crawling | |
crossclj.info and filtering for the popularity of the project." | |
(:require [me.raynes.laser :as l] | |
[clojure.string :as str] | |
[leiningen.plz :refer [fallback-nicknames]])) | |
(def prj-from-crossclj | |
"Fetches a list of projects from crossclj.info" | |
(apply str |
This file contains 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
(deftype Bar [a] | |
Object | |
(equals [self other] true) | |
(toString [_] (str a))) | |
(defn barme [a] (->Bar a)) | |
(set! *data-readers* {'bar myns/barme}) | |
;; #bar :foo => nil |
OlderNewer