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
(** | |
* 圏論勉強会#9 | |
* | |
* 関数 fact の最小不動点を調べる 例をSMLで実装 | |
* http://nineties.github.io/category-seminar/9.html#/45 | |
* | |
*) | |
structure Fact = | |
struct | |
infixr 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
(** | |
* 圏論勉強会 @ ワークスアプリケーションズ#8 | |
* http://nineties.github.io/category-seminar/8.html#/55 | |
* 練習問題 回答 | |
* | |
* 実行方法(for SML/NJ) | |
* $ cat banana.cm | |
* group | |
* is | |
* $/basis.cm |
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
(** | |
* SEND | |
* + MORE | |
* ------ | |
* MONEY | |
* | |
* S,E,N,D,M,O,R,Y | |
* | |
* run: | |
* - Option.app (print o pp) (search ()) |
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
(* | |
* (* debruijn.cm *) | |
* Group | |
* is | |
* $/basis.cm | |
* debrujn.sml | |
*) | |
(** | |
* De Bruijn変換 |
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
(** | |
* datatype replication declarations(specifications)のサンプル | |
*) | |
(** monomorphic version *) | |
structure S = | |
struct | |
datatype either = L | R | |
end |
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
(*** | |
* Array, Vector 等の固定長データ構造を生成するために状態を持ちたい。 | |
* unfold すればよいが、要素を一つずつ連結するのはイヤ(重すぎる)なので 配列用unfold 作ってみた | |
* ***) | |
infixr 1 $ | |
fun f $ a = f a | |
structure Array = |
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
library | |
structure Sample | |
is | |
$/basis.cm | |
$/qcheck.cm | |
qcheck_sample.sml |
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
(* see. http://d.hatena.ne.jp/a-hisame/20120217/1329499672 *) | |
(* =========================================================== | |
* for using | |
* > sml | |
* > use "caesar.sml"; | |
* > Caesar.encode "hoge"; | |
* val it = "mtlj" : string | |
* > _ |
NewerOlder