horses icon indicating copy to clipboard operation
horses copied to clipboard

Property tests in modules

Open danieljharvey opened this issue 2 years ago • 0 comments

def swap (pair: (a,b)): (b,a) {
  case pair of (a,b) -> (b, a)
}

property "two swaps is same as original" (pair: (a,b)) {
  swap (swap pair) == pair
}

danieljharvey avatar Jul 10 '23 21:07 danieljharvey