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
functor Hamt(X: | |
sig | |
eqtype k | |
val hash: k -> Int32.int | |
end | |
): sig | |
type 'v t | |
exception HashConflict | |
val empty: 'v t |
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
use std::ops::{Index, IndexMut}; | |
pub struct User { | |
id: u64, | |
name: String, | |
} | |
impl User { | |
pub fn new(id_var: u64, name_var: String) -> Self { | |
User { |
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: stdjareport | |
@import: stage0 | |
let-inline \show-int n = embed-string (arabic n) | |
in | |
document (| | |
title = {サンプル文書}; | |
author = {組 版太郎}; | |
|) '< |
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
[| x |] = λk.k x ・・・val | |
[| λx.t |] = λk.k (λx.[|t|]) ・・・lam | |
[| π t |] = λk.[|t|] (λa.k (π a)) ・・・app1 | |
[| t1 t2 |] = λk.[|t1|] (λf.[|t2|] (λa.f a k)) ・・・app2 | |
[| Sx.t |] = λk.[x↦λa.λk'.k' (k a)]([|t|] (λv.v))・・・shift | |
[| <t> |] = λk.k ([|t|] (λv.v)) ・・・reset | |
変換対象: <add10 (Sx.x (x 100))> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# coding: utf-8 | |
var = [ | |
{ "id": "hello", "title": "Hello World", "children": [ | |
{ "id": "comment", "title": "コメント", "children": nil }, | |
{ "id": "print", "title": "フォーマットしてプリント", "children": [ | |
{ "id": "print_debug", "title": "デバッグ", "children": nil }, | |
{ "id": "print_display", "title": "ディスプレイ", "children": [ | |
{ "id": "testcase_list", "title": "テストケース: リスト", "children": nil } | |
] }, | |
{ "id": "fmt", "title": "フォーマット", "children": nil } |
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
running 3 tests | |
test bench::benth_fib_memo1 ... bench: 5,237 ns/iter (+/- 411) | |
test bench::benth_fib_memo1_2 ... bench: 2 ns/iter (+/- 0) | |
test bench::benth_fib_memo2 ... bench: 2 ns/iter (+/- 0) | |
test result: ok. 0 passed; 0 failed; 0 ignored; 3 measured; 0 filtered out |
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
//! parent level doc comments | |
mod path { | |
/*! parent level doc comment2 */ | |
pub mod name { | |
pub type Type = String; | |
pub const CONSTANT: &'static str = "const"; | |
} | |
} |
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
struct DbConn; | |
#[derive(Clone, Copy)] | |
struct User; | |
#[derive(Clone, Copy)] | |
struct Device; | |
enum Error { | |
ReadPrivilege, | |
WritePrivilege, |
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
{-#LANGUAGE TypeFamilies, MultiParamTypeClasses, FlexibleInstances #-} | |
class Overload a b where | |
type Out a b :: * | |
(+):: a -> b -> Out a b | |
instance Overload Int Int where | |
type Out Int Int = Int | |
(+) = (Prelude.+) |