エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
GitHub - TeXitoi/rust-mdo: Monadic do notation for rust using macro and duck typing
記事へのコメント1件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
GitHub - TeXitoi/rust-mdo: Monadic do notation for rust using macro and duck typing
#[macro_use] extern crate mdo; fn main() { // exporting the monadic functions for the Iterator mo... #[macro_use] extern crate mdo; fn main() { // exporting the monadic functions for the Iterator monad (similar // to list comprehension) use mdo::iter::{bind, ret, mzero}; // getting the list of (x, y, z) such that // - 1 <= x <= y < z < 11 // - x^2 + y^2 == z^2 let l = bind(1i32..11, move |z| bind(1..z, move |x| bind(x..z, move |y| bind(if x * x + y * y == z * z { ret(()) } else { mzero() }, move



2015/10/18 リンク