diff options
author | Helmut Grohne <grohne@cs.uni-bonn.de> | 2014-02-10 15:50:27 +0100 |
---|---|---|
committer | Helmut Grohne <grohne@cs.uni-bonn.de> | 2014-02-10 15:50:27 +0100 |
commit | 6cc566c46889c5e7aafc8d75c6627137e56ab30f (patch) | |
tree | 092dce779785d17f572dfd1880baa23c69cd1a33 /Examples.agda | |
parent | 586d72e18898311d975f5748bca397c403b6a83b (diff) | |
parent | 04b7bf8fabf64a2414d64cfb385f6a397da0a0fb (diff) | |
download | bidiragda-6cc566c46889c5e7aafc8d75c6627137e56ab30f.tar.gz |
Merge branch master into feature-shape-update
For building on the sieve example.
Diffstat (limited to 'Examples.agda')
-rw-r--r-- | Examples.agda | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Examples.agda b/Examples.agda index 70628a5..5971460 100644 --- a/Examples.agda +++ b/Examples.agda @@ -1,6 +1,6 @@ module Examples where -open import Data.Nat using (ℕ ; zero ; suc ; _⊓_ ; _∸_) +open import Data.Nat using (ℕ ; zero ; suc ; _⊓_ ; _∸_ ; ⌈_/2⌉) open import Data.Vec using (Vec ; [] ; _∷_ ; reverse ; _++_) import GetTypes @@ -37,3 +37,10 @@ drop' n = assume-get (f n) f zero xs = xs f (suc n) [] = [] f (suc n) (x ∷ xs) = f n xs + +sieve' : Get +sieve' = assume-get f + where f : {A : Set} {n : ℕ} → Vec A n → Vec A ⌈ n /2⌉ + f [] = [] + f (x ∷ []) = x ∷ [] + f (x ∷ _ ∷ xs) = x ∷ f xs |