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
(** | |
* Computer Mathematics 2019 / Lecture 5, Part 1: The Horner's rule | |
* https://atelieraterui.page.link/NqaR | |
* | |
* 講義を読んで書いたコード断片。 | |
* - 整数の 10 <-> 2進数変換 | |
* - 実数の小数部の 10 -> 2進数変換 | |
*) | |
structure 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
_require "basis.smi" | |
_require "ffi.smi" |
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 | |
* > _ |
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
環境 | |
==== | |
- CentOS Linux release 7.4.1708 (Core) | |
- https://github.com/ucsd-progsys/liquidhaskell.git (commit:16307c7403ba1aeeef9205b414785d36e93a402b) | |
- stack setup && stack install (GHC 8.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
(** | |
* SML# <-> PCRE(http://www.pcre.org/) binding sample | |
*) | |
(* | |
* ~/work/pcre_sharp$ rlwrap -c smlsharp -L/usr/lib -lpcre | |
* SML# version 1.2.0 (2012-11-14 18:25:26 JST) for x86-linux | |
* # use "pcre.sml"; | |
* match!(314) | |
* structure Pcre = ... |
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 練習問題 回答 | |
* http://nineties.github.io/category-seminar/10.html#/38 | |
* | |
* | |
* 実行方法: | |
* $ cat tree.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
(** | |
* 圏論勉強会#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変換 |
NewerOlder