*** *** tutorial (Sep. 23) *** ***
Full house at continuation tutorial #icfp http://t.co/cVB3QuzN
2011-09-23 19:17:09@tanakh OchaCaml の例を限定継続モナドを使って書いたものがここにあるので、参考にしてみてください。 http://t.co/KKVsnF3b
2011-09-23 18:46:35Haskellの限定継続モナド http://j.mp/a5mK51 liboleg http://j.mp/oVzOiM (最新版三つ) http://j.mp/qMgi3J http://j.mp/qqDIgX http://j.mp/nHyj1K #continuation
2011-09-23 18:51:03「liboleg から限定継続モナドだけ切り離して欲しい」「oleg さんに限定継続モナドだけ別にアップロードしたいと言えば良いのでは?」 #continuation #ICFP
2011-09-23 18:53:41*** OchaCaml ***
If you are gcc-4.6.1 user, remove -no-cpp-precomp switch from OPTS variable of cl75/src/Makefile. #icfp #cont2011
2011-09-23 19:06:04ふむ。 let f = fun() -> 3 + shift (fun _ -> 2) in reset f - 1;; #cont2011
2011-09-23 19:21:21# let discarder x = shift (fun _ -> x);; discarder : 'a => 'b = <fun> こんなことができるのか #cont2011
2011-09-23 19:26:56# let here = shift (fun k -> k);;This expression is not pure.Answer types are 'e and 'f / 'g -> 'e / 'g.うーん. #cont2011
2011-09-23 19:36:04@MoCo7 いちいち shift (fun k->k)を書くのが面倒なのでletしてみたのでした. これは横着せずちゃんと書かないと駄目みたいですね..
2011-09-23 19:38:27@gusmachine ああ、thunk にするのはどうでしょう。shift は呼び出されたときに実行されてしまうので。let here () = shift (fun k -> k) ();; で here ()。
2011-09-23 19:40:00# let here = fun () -> shift (fun k -> k);;here : unit => 'a = <fun>できた. #cont2011
2011-09-23 19:43:36そして、 # reset (fun () -> 1::2::3::here ()) [6;5;4];;- : int list = [1; 2; 3; 6; 5; 4]#cont2011
2011-09-23 19:43:53型が読めない.. This expression has type unit / 'a -> 'b / ('b / 'c -> 'a / 'c), but is used with type int list. #cont2011
2011-09-23 19:44:27