Skip to content

Instantly share code, notes, and snippets.

;;; This was installed by package-install.el.
;;; This provides support for the package system and
;;; interfacing with ELPA, the package archive.
;;; Move this code earlier if you want to reference
;;; packages in your .emacs.
(when
(load
(expand-file-name "~/.emacs.d/elpa/package.el"))
(package-initialize))
(require 'slime)
(require 'slime-repl)
(setq slime-net-coding-system 'utf-8-unix
slime-protocol-version 'ignore)
(slime-setup '(slime-repl))
(require 'clojure-mode)
(add-to-list 'auto-mode-alist '("\\.clj$" . clojure-mode))
diff --git a/project.clj b/project.clj
index 466f9c7..da3a1b8 100644
--- a/project.clj
+++ b/project.clj
@@ -41,4 +41,5 @@
:java-source-path "src/main/java"
:javac-fork "true"
:jar-exclusions [#"(?:^|/).svn/"]
+ :main am.ik.categolj.run
:run-aliases {:server [am.ik.categolj.run -main]})
(defproject sample-program "1.0.0-SNAPSHOT"
:description "FIXME: write"
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]]
:dev-dependencies [[swank-clojure "1.2.1"]])
diff --git a/project.clj b/project.clj
index 0a56199..f657ebb 100644
--- a/project.clj
+++ b/project.clj
@@ -1,4 +1,5 @@
(defproject sample-program "1.0.0-SNAPSHOT"
:description "FIXME: write"
:dependencies [[org.clojure/clojure "1.2.0"]
- [org.clojure/clojure-contrib "1.2.0"]])
+ [org.clojure/clojure-contrib "1.2.0"]]+ :dev-dependencies [[swank-clojure "1.2.1"]])
(ns sample-program.core)
(def fib-seq
(lazy-cat [0 1] (map + (rest fib-seq) fib-seq)))
(defn fib [n]
(nth fib-seq n))
@masaedw
masaedw / date.hs
Created February 9, 2011 15:19 — forked from kana/date.hs
import System.Time
import System.Locale
main = getClockTime >>=
toCalendarTime >>=
putStrLn . formatCalendarTime defaultTimeLocale "%c"
@masaedw
masaedw / system_attribute.fs
Created February 18, 2011 16:50
System.Attribute
open System
open System.Reflection
// An enum of animals.
type Animal =
| Dog = 1
| Cat = 2
| Bird = 3
// A custom attribute to allow a target to have a pet.
;;; 変数に設定
;; 整数を受け取って
;; 10を足して返す関数
(defn plus10 [a]
(+ a 10))
(def f plus10)
;; 42