Skip to content

Instantly share code, notes, and snippets.

;;; ゼルダの伝説 (SFC) で、鍵と扉がそれぞれ n 個のとき、
;;; ダンジョンのとりうる状態数を返す zelda 関数 (仮)
(use srfi-1)
(define (zelda n)
(define (combination n m)
(/ (apply * (iota m (+ (- n m) 1) 1))
(apply * (iota m 1 1))))
(define (sum list) (apply + list))
;; 第1回 Scheme コードバトン
;;
;; ■ これは何か?
;; Scheme のコードをバトンのように回していき面白い物ができあがるのを楽しむ遊びです。
;; 次回 Shibuya.lisp で成果を発表します。
;; Scheme 初心者のコードを書くきっかけに、中級者には他人のコードを読む機会になればと思います。
;;
;; ■ 2 つのルール
;;
;; (1)自分がこれだと思える変更をコードに加えて2日以内に次の人にまわしてください。
;; なんかうまくいかない版
(defn myflatten [lst]
(lazy-seq
(if (empty? lst) lst
(let [[x & xs] lst]
(if (seq? x)
(myconcat (myflatten x) (myflatten xs))
(cons x (myflatten xs)))))))
;; うまくいく版
;; 最後のデータが保存されちゃう問題についての再現コード
;;
;; ★やりたいこと
;;
;; サーバから次のようなデータ(¥n区切りの文字列)が送られてくる
;; aaa
;; bbb
;; ccc
;; end
;; ddd
--- lein 2010-05-09 22:48:51.000000000 +0900
+++ bin/lein 2010-05-09 23:01:27.000000000 +0900
@@ -2,7 +2,8 @@
VERSION="1.1.0"
-CLASSPATH="$(find lib/ -follow -mindepth 1 -maxdepth 1 -print0 2> /dev/null | tr \\0 \:)"
+CLASSPATH_LOCAL="$(find lib/ -follow -mindepth 1 -maxdepth 1 -print0 2> /dev/null | tr \\0 \:)"
+CLASSPATH=$CLASSPATH_LOCAL
LEIN_JAR="$HOME/.m2/repository/leiningen/leiningen/$VERSION/leiningen-$VERSION-standalone.jar"
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 157b2dd..f3807b7 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -1263,6 +1263,11 @@ the operating system.")
(add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system))
+(declare-function ns-toggle-fullscreen-internal "nsfns.m" ())
+(defun ns-toggle-fullscreen ()
#include <stdio.h>
int main(int ac, char** av)
{
printf("Hello, gist!\n");
return 0;
}
puts "Hello, gist!"
(display "Hello, gist!")
(newline)
;;; 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))