Skip to content

Instantly share code, notes, and snippets.

@brunoczim
Created August 11, 2018 04:48
Show Gist options
  • Save brunoczim/b7eb9a6dc9424ee78e14d6dfda03db5e to your computer and use it in GitHub Desktop.
Save brunoczim/b7eb9a6dc9424ee78e14d6dfda03db5e to your computer and use it in GitHub Desktop.
module DependentCond where
data Bool : Set where
false : Bool
true : Bool
choose : Bool → Set → Set → Set
choose true x _ = x
choose false _ x = x
if_then_else_ : {A B : Set} → (x : Bool) → A → B → choose x A B
if true then x else _ = x
if false then _ else x = x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment