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
;;; 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)) |
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
(require 'slime) | |
(require 'slime-repl) | |
(setq slime-net-coding-system 'utf-8-unix | |
slime-protocol-version 'ignore) | |
(slime-setup '(slime-repl)) |
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
(require 'clojure-mode) | |
(add-to-list 'auto-mode-alist '("\\.clj$" . clojure-mode)) |
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
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]}) |
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
(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"]]) |
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
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"]]) |
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 sample-program.core) | |
(def fib-seq | |
(lazy-cat [0 1] (map + (rest fib-seq) fib-seq))) | |
(defn fib [n] | |
(nth fib-seq n)) |
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
import System.Time | |
import System.Locale | |
main = getClockTime >>= | |
toCalendarTime >>= | |
putStrLn . formatCalendarTime defaultTimeLocale "%c" |
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
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. |
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
;;; 変数に設定 | |
;; 整数を受け取って | |
;; 10を足して返す関数 | |
(defn plus10 [a] | |
(+ a 10)) | |
(def f plus10) | |
;; 42 |