Extending and Simplifying C++: Thoughts on Pattern Matching using 'is' and 'as', and Can C++ be 10x Simpler
0 码力 | 108 页 | 5.08 MB | 5 月前3Agda User Manual v2.6.3
Treeless Syntax Coverage Checking Single match on a non-indexed datatype Matching on multiple arguments Copattern matching Matching on indexed datatypes General case Cubical The interval and path types Simple datatypes Parametrized datatypes Indexed datatypes Strict positivity Flat Modality Pattern Matching on @♭ Foreign Function Interface Compiler Pragmas Haskell FFI JavaScript FFI Function Definitions fields Dependent irrelevant function types Irrelevant instance arguments Lambda Abstraction Pattern matching lambda Local Definitions: let and where let-expressions where-blocks Proving properties More Examples0 码力 | 379 页 | 354.83 KB | 1 年前3Agda User Manual v2.6.2.2
Treeless Syntax Coverage Checking Single match on a non-indexed datatype Matching on multiple arguments Copattern matching Matching on indexed datatypes General case Cubical The interval and path types Simple datatypes Parametrized datatypes Indexed datatypes Strict positivity Flat Modality Pattern Matching on @♭ Foreign Function Interface Compiler Pragmas Haskell FFI JavaScript FFI Function Definitions Irrelevant instance arguments Subtyping of irrelevant function spaces Lambda Abstraction Pattern matching lambda Local Definitions: let and where let-expressions where-blocks Proving properties More Examples0 码力 | 354 页 | 433.60 KB | 1 年前3Agda User Manual v2.6.2
Treeless Syntax Coverage Checking Single match on a non-indexed datatype Matching on multiple arguments Copattern matching Matching on indexed datatypes General case Cubical The interval and path types Simple datatypes Parametrized datatypes Indexed datatypes Strict positivity Flat Modality Pattern Matching on @♭ Foreign Function Interface Compiler Pragmas Haskell FFI JavaScript FFI Function Definitions Irrelevant instance arguments Subtyping of irrelevant function spaces Lambda Abstraction Pattern matching lambda Local Definitions: let and where let-expressions where-blocks Proving properties More Examples0 码力 | 348 页 | 414.11 KB | 1 年前3Agda User Manual v2.6.2.1
Treeless Syntax Coverage Checking Single match on a non-indexed datatype Matching on multiple arguments Copattern matching Matching on indexed datatypes General case Cubical The interval and path types Simple datatypes Parametrized datatypes Indexed datatypes Strict positivity Flat Modality Pattern Matching on @♭ Foreign Function Interface Compiler Pragmas Haskell FFI JavaScript FFI Function Definitions Irrelevant instance arguments Subtyping of irrelevant function spaces Lambda Abstraction Pattern matching lambda Local Definitions: let and where let-expressions where-blocks Proving properties More Examples0 码力 | 350 页 | 416.80 KB | 1 年前3Agda User Manual v2.6.4
a = cons a (cycle a) Instead, you can use copattern matching: cycle a .hd = a cycle a .tl = cycle a It is also possible to use copattern-matching lambdas: 44 Chapter 3. Language Reference Agda User backward-2 enum-Nat 5 ≡ 3 test2 = refl Note that if we want to use automated case-splitting and pattern matching to implement one of the fields, we need to do so in a separate definition. With copatterns, we zero = zero pred (suc x) = x With copatterns, we can do the case analysis directly by pattern matching: open Enumeration enum-Nat : Bool → Enumeration Nat start (enum-Nat true) = 42 start (enum-Nat0 码力 | 313 页 | 1.38 MB | 1 年前3Agda User Manual v2.6.3
a = cons a (cycle a) Instead, you can use copattern matching: cycle a .hd = a cycle a .tl = cycle a It is also possible to use copattern-matching lambdas: 44 Chapter 3. Language Reference Agda User backward-2 enum-Nat 5 ≡ 3 test2 = refl Note that if we want to use automated case-splitting and pattern matching to implement one of the fields, we need to do so in a separate definition. With copatterns, we zero = zero pred (suc x) = x With copatterns, we can do the case analysis directly by pattern matching: open Enumeration enum-Nat : Bool → Enumeration Nat start (enum-Nat true) = 42 start (enum-Nat0 码力 | 288 页 | 1.24 MB | 1 年前3Agda User Manual v2.6.4.1
a = cons a (cycle a) Instead, you can use copattern matching: cycle a .hd = a cycle a .tl = cycle a It is also possible to use copattern-matching lambdas: 44 Chapter 3. Language Reference Agda User backward-2 enum-Nat 5 ≡ 3 test2 = refl Note that if we want to use automated case-splitting and pattern matching to implement one of the fields, we need to do so in a separate definition. With copatterns, we zero = zero pred (suc x) = x With copatterns, we can do the case analysis directly by pattern matching: open Enumeration enum-Nat : Bool → Enumeration Nat start (enum-Nat true) = 42 start (enum-Nat0 码力 | 311 页 | 1.38 MB | 1 年前3Agda User Manual v2.6.4.3
a = cons a (cycle a) Instead, you can use copattern matching: cycle a .hd = a cycle a .tl = cycle a It is also possible to use copattern-matching lambdas: cycle' : ∀{A} → A → Stream' A cycle' a = ? backward-2 enum-Nat 5 ≡ 3 test2 = refl Note that if we want to use automated case-splitting and pattern matching to implement one of the fields, we need to do so in a separate definition. With copatterns, we zero = zero pred (suc x) = x With copatterns, we can do the case analysis directly by pattern matching: open Enumeration enum-Nat : Bool → Enumeration Nat start (enum-Nat true) = 42 start (enum-Nat0 码力 | 311 页 | 1.38 MB | 1 年前3Agda User Manual v2.6.4.2
a = cons a (cycle a) Instead, you can use copattern matching: cycle a .hd = a cycle a .tl = cycle a It is also possible to use copattern-matching lambdas: cycle' : ∀{A} → A → Stream' A cycle' a = ? backward-2 enum-Nat 5 ≡ 3 test2 = refl Note that if we want to use automated case-splitting and pattern matching to implement one of the fields, we need to do so in a separate definition. With copatterns, we zero = zero pred (suc x) = x With copatterns, we can do the case analysis directly by pattern matching: open Enumeration enum-Nat : Bool → Enumeration Nat start (enum-Nat true) = 42 start (enum-Nat0 码力 | 311 页 | 1.38 MB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100