Starting from:
lein new foo
cd foo
Say I have a random JAR file that is not available in any repository:
touch README.md
| (ns sunil.curry) | |
| (defn partial+ | |
| "Takes a function f and fewer than the normal arguments to f, and | |
| returns a fn that takes a variable number of additional args. When | |
| called, the returned function calls f with args + additional args. | |
| differs from the core version in that it works on just one argument." | |
| {:added "1.0"} | |
| ([f] f) | |
| ([f arg1] |
| module FizzBuzzC | |
| %default total | |
| -- Dependently typed FizzBuzz, constructively | |
| -- A number is fizzy if it is evenly divisible by 3 | |
| data Fizzy : Nat -> Type where | |
| ZeroFizzy : Fizzy 0 | |
| Fizz : Fizzy n -> Fizzy (3 + n) |
A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.
How to use:
| (ns core.clj | |
| (:require [clojure.string :as str] | |
| [fipp.edn :refer [pprint] :rename {pprint fipp}] | |
| [com.positronic-solutions.pulley.cps :refer :all] | |
| [no.disassemble :refer :all])) | |
| (defn stacks [] | |
| (->> disassemble | |
| call-cc | |
| str/split-lines |