2017-10-04から1日間の記事一覧
phpとjsとhtmlでhello worldしてみた。 \n".wrap("html", $content); } function wrap($title,$content, $options=null) { if ($options == null) { return "<$title>\n"." ".$content."</$title>\n"; } else { $res = ""; foreach($options as $key => …
APIをFutureで返す。bindはとりあえず省略。 @interface Future<V> : NSObject - (void)get:(void(^)(V))cb; @end @interface API<I,O> : NSObject - (Future<O> *)getAPI:(I)input; @end typedef void(^CallBack)(id); typedef void(^CPS)(CallBack); @interface Futur</o></i,o></v>…
Objective-Cで継続モナドを書いてみた。ジェネリクスの機能が貧弱なので辛いところが多い。