Reusable Code & Reusable Data Structures
const& c) { } 1 2 auto rects = tc::make_vector(tc::transform(c, 3 [](widget const& w) { return w.bounding_box(); } 4 )); 5 // Magic happens 6 tc::for_each(tc::zip(c, rects), 7 [&](widget& const& c) { } 1 2 auto rects = tc::make_vector(tc::transform(c, 3 [](widget const& w) { return w.bounding_box(); } 4 )); 5 // Magic happens 6 tc::for_each(tc::zip(c, rects), 7 [&](widget& [&](widget& w, rect r) { 8 widget.place(r); 9 } 10 11 ); 12 auto rects = tc::make_vector(tc::transform(c, [](widget const& w) { return w.bounding_box(); } )); // https://github.com/think-cell/think-cell-library0 码力 | 132 页 | 14.20 MB | 5 月前3Express Your Expectations: A Fast, Compliant JSON Pull Parser for Writing Robust Applications
Cordell Jonathan Müller — @foonathan Express your expectations CppCon 2023-10-03 1tc::json::parser Extract some JSON members tc nlohmann RapidJSON Boost.JSON simdjson 0 10 20 30 40 Library Time in ms stdv::filter([](int i) { return i % 2 == 0; }) | stdv::transform([](int i) { return i * i; }); return tc::find_first_if<tc::return_value_or_none>(even_squares, [](int square) { return square % 3 == 0; }); } Jonathan struct tc::json::parser { … }; Jonathan Müller — @foonathan Express your expectations CppCon 2023-10-03 52Pulling primitive values templatestruct tc::json::parser 0 码力 | 143 页 | 736.91 KB | 5 月前3Agda User Manual v2.6.3
particular implicit argument using the @(tactic t) attribute, where t : Term → TC ⊤. For instance: clever-search : Term → TC ⊤ clever-search hole = unify hole (lit (nat 17)) the-best-number : {@(tactic arguments to the function: default : {A : Set} → A → Term → TC ⊤ default x hole = bindTC (quoteTC x) (unify hole) search : (depth : Nat) → Term → TC ⊤ example : {@(tactic default 10) depth : Nat} {@(tactic checking monad TC: postulate TC : ∀ {a} → Set a → Set a returnTC : ∀ {a} {A : Set a} → A → TC A bindTC : ∀ {a b} {A : Set a} {B : Set b} → TC A → (A → TC B) → TC B {-# BUILTIN AGDATCM TC #-} (continues0 码力 | 288 页 | 1.24 MB | 1 年前3Agda User Manual v2.6.4.1
particular implicit argument using the @(tactic t) attribute, where t : Term → TC ⊤. For instance: clever-search : Term → TC ⊤ clever-search hole = unify hole (lit (nat 17)) the-best-number : {@(tactic arguments to the function: default : {A : Set} → A → Term → TC ⊤ default x hole = bindTC (quoteTC x) (unify hole) search : (depth : Nat) → Term → TC ⊤ example : {@(tactic default 10) depth : Nat} {@(tactic checking monad TC: postulate TC : ∀ {a} → Set a → Set a returnTC : ∀ {a} {A : Set a} → A → TC A bindTC : ∀ {a b} {A : Set a} {B : Set b} → TC A → (A → TC B) → TC B {-# BUILTIN AGDATCM TC #-} {-# BUILTIN0 码力 | 311 页 | 1.38 MB | 1 年前3Agda User Manual v2.6.4.3
particular implicit argument using the @(tactic t) attribute, where t : Term → TC ⊤. For instance: clever-search : Term → TC ⊤ clever-search hole = unify hole (lit (nat 17)) the-best-number : {@(tactic arguments to the function: default : {A : Set} → A → Term → TC ⊤ default x hole = bindTC (quoteTC x) (unify hole) search : (depth : Nat) → Term → TC ⊤ example : {@(tactic default 10) depth : Nat} {@(tactic checking monad TC: postulate TC : ∀ {a} → Set a → Set a returnTC : ∀ {a} {A : Set a} → A → TC A bindTC : ∀ {a b} {A : Set a} {B : Set b} → TC A → (A → TC B) → TC B {-# BUILTIN AGDATCM TC #-} {-# BUILTIN0 码力 | 311 页 | 1.38 MB | 1 年前3Agda User Manual v2.6.4.2
particular implicit argument using the @(tactic t) attribute, where t : Term → TC ⊤. For instance: clever-search : Term → TC ⊤ clever-search hole = unify hole (lit (nat 17)) the-best-number : {@(tactic arguments to the function: default : {A : Set} → A → Term → TC ⊤ default x hole = bindTC (quoteTC x) (unify hole) search : (depth : Nat) → Term → TC ⊤ example : {@(tactic default 10) depth : Nat} {@(tactic checking monad TC: postulate TC : ∀ {a} → Set a → Set a returnTC : ∀ {a} {A : Set a} → A → TC A bindTC : ∀ {a b} {A : Set a} {B : Set b} → TC A → (A → TC B) → TC B {-# BUILTIN AGDATCM TC #-} {-# BUILTIN0 码力 | 311 页 | 1.38 MB | 1 年前3Agda User Manual v2.6.2
particular implicit argument using the @(tactic t) attribute, where t : Term → TC ⊤. For instance: clever-search : Term → TC ⊤ clever-search hole = unify hole (lit (nat 17)) the-best-number : {@(tactic arguments to the function: default : {A : Set} → A → Term → TC ⊤ default x hole = bindTC (quoteTC x) (unify hole) search : (depth : Nat) → Term → TC ⊤ example : {@(tactic default 10) depth : Nat} {@(tactic checking monad TC: postulate TC : ∀ {a} → Set a → Set a returnTC : ∀ {a} {A : Set a} → A → TC A bindTC : ∀ {a b} {A : Set a} {B : Set b} → TC A → (A → TC B) → TC B {-# BUILTIN AGDATCM TC #-} {-# BUILTIN0 码力 | 255 页 | 1.13 MB | 1 年前3Agda User Manual v2.6.2.2
particular implicit argument using the @(tactic t) attribute, where t : Term → TC ⊤. For instance: clever-search : Term → TC ⊤ clever-search hole = unify hole (lit (nat 17)) the-best-number : {@(tactic arguments to the function: default : {A : Set} → A → Term → TC ⊤ default x hole = bindTC (quoteTC x) (unify hole) search : (depth : Nat) → Term → TC ⊤ example : {@(tactic default 10) depth : Nat} {@(tactic built-in type checking monad TC: 142 Chapter 3. Language Reference Agda User Manual, Release 2.6.2.2 postulate TC : ∀ {a} → Set a → Set a returnTC : ∀ {a} {A : Set a} → A → TC A bindTC : ∀ {a b} {A : Set0 码力 | 257 页 | 1.16 MB | 1 年前3Agda User Manual v2.6.2.1
particular implicit argument using the @(tactic t) attribute, where t : Term → TC ⊤. For instance: clever-search : Term → TC ⊤ clever-search hole = unify hole (lit (nat 17)) the-best-number : {@(tactic arguments to the function: default : {A : Set} → A → Term → TC ⊤ default x hole = bindTC (quoteTC x) (unify hole) search : (depth : Nat) → Term → TC ⊤ example : {@(tactic default 10) depth : Nat} {@(tactic checking monad TC: postulate TC : ∀ {a} → Set a → Set a returnTC : ∀ {a} {A : Set a} → A → TC A bindTC : ∀ {a b} {A : Set a} {B : Set b} → TC A → (A → TC B) → TC B {-# BUILTIN AGDATCM TC #-} {-# BUILTIN0 码力 | 255 页 | 1.14 MB | 1 年前3Agda User Manual v2.6.4
particular implicit argument using the @(tactic t) attribute, where t : Term → TC ⊤. For instance: clever-search : Term → TC ⊤ clever-search hole = unify hole (lit (nat 17)) the-best-number : {@(tactic arguments to the function: default : {A : Set} → A → Term → TC ⊤ default x hole = bindTC (quoteTC x) (unify hole) search : (depth : Nat) → Term → TC ⊤ example : {@(tactic default 10) depth : Nat} {@(tactic checking monad TC: postulate TC : ∀ {a} → Set a → Set a returnTC : ∀ {a} {A : Set a} → A → TC A bindTC : ∀ {a b} {A : Set a} {B : Set b} → TC A → (A → TC B) → TC B {-# BUILTIN AGDATCM TC #-} {-# BUILTIN0 码力 | 313 页 | 1.38 MB | 1 年前3
共 365 条
- 1
- 2
- 3
- 4
- 5
- 6
- 37