Skip to content

Instantly share code, notes, and snippets.

View oteku's full-sized avatar
💭
Focusing

Thomas Haessle oteku

💭
Focusing
View GitHub Profile
@oteku
oteku / torumagic.mligo
Last active December 9, 2021 01:57
CCG Ligo smartcontract
// MAGIC CARD DESIGN
// type color =
// | Blue
// | Green
// | Red
// | Black
// | White
// type card_color =
// | Colored of color
@oteku
oteku / rs-pipe-compose.rs
Created April 7, 2019 22:19
Rust composition vs pipe vs pipe operator
// function used to compose
fn compose_two<A, B, C, G, F>(f: F, g: G) -> impl Fn(A) -> C
where
F: Fn(A) -> B,
G: Fn(B) -> C,
{
move |x| g(f(x))
}
fn pipe_two<A, B, F>(a : A, f: F) -> B