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 boggle | |
(require [clojure.string :as str])) | |
(def words | |
(set (str/split-lines (slurp "brit-a-z.txt")))) | |
(defn select-words [s]) | |
"Produces a list of words which start with 's'" | |
(filter #(.startsWith % s) words)) |
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
;;; cljdoc.el --- eldoc mode for clojure | |
;; Copyright (C) 2011 tomykaira | |
;; Version 0.1.0 | |
;; Keywords: eldoc clojure | |
;; Author: tomykaira <[email protected]> | |
;; URL: https://gist.github.com/1386472 | |
;; This file is not part of GNU Emacs. |
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
;; finitud's solution to Reverse a Sequence | |
;; https://4clojure.com/problem/23 | |
#(if (empty? %2) | |
%1 | |
(recur (conj %1 (last %2)) | |
(butlast %2))) | |
[] |
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 inc-sandbox.corr-demo | |
(:require [clojure.set :as set]) | |
(:use (incanter core stats charts io)) | |
(:require [clj-time.core :as time]) | |
(:use (clj-time [format :only (formatter formatters parse)] | |
[coerce :only (to-long)]))) | |
(defn sym-to-dataset | |
"returns a dataset read from a local CSV in './data/' given a Yahoo Finance symbol name" | |
[yf-symbol] |
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
; A REPL-based, annotated Seesaw tutorial | |
; Please visit https://github.com/daveray/seesaw for more info | |
; | |
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers | |
; Seesaw's basic features and philosophy, but only scratches the surface | |
; of what's available. It only assumes knowledge of Clojure. No Swing or | |
; Java experience is needed. | |
; | |
; This material was first presented in a talk at @CraftsmanGuild in | |
; Ann Arbor, MI. |
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
;; finitud's solution to Count a Sequence | |
;; https://4clojure.com/problem/22 | |
(fn [x] | |
((fn [x n] | |
(if (= (rest x) ()) | |
n | |
(recur (rest x) (+ n 1))) | |
) | |
x 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
;; finitud's solution to Nth Element | |
;; https://4clojure.com/problem/21 | |
(fn [x n] | |
(if (= n 0) (first x) | |
(recur (rest x) (- n 1)))) |
NewerOlder