Skip to content

Instantly share code, notes, and snippets.

@msmorgan
Created October 10, 2017 19:53
Show Gist options
  • Select an option

  • Save msmorgan/384a7306fce7f714263c9793b6caf5be to your computer and use it in GitHub Desktop.

Select an option

Save msmorgan/384a7306fce7f714263c9793b6caf5be to your computer and use it in GitHub Desktop.
module InfixrBooleanOps
%default total
factorial : Nat -> Integer
factorial Z = 1
factorial (S n) = (cast (S n)) * factorial n
infixr 4 &&>, ||>
(&&>) : Bool -> Lazy Bool -> Bool
(&&>) = (&&)
(||>) : Bool -> Lazy Bool -> Bool
(||>) = (||)
test1 : Bool
test1 = True ||> factorial 10000 < 100 ||> factorial 100000 > 25
test2 : Bool
test2 = False ||> factorial 10000 < 100 ||> factorial 100000 > 25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment