 				assert(false, "Cannot find the maximum element of an empty list.")
 			case .Destructure(_, _):
 				return foldl1({ (let t) -> A in
-					if cmp(fst(t), snd(t)) {
-						return fst(t)
-					}
-					return snd(t)
+					return cmp(fst(t), snd(t)) ? fst(t) : snd(t)
 				})(l)
 		}
 	}

				assert(false, "Cannot find the minimum element of an empty list.")
			case .Destructure(_, _):
				return foldl1({ (let t) -> A in
					if cmp(fst(t), snd(t)) {
						return snd(t)
					}
					return fst(t)
				})(l)
		}
	}
}


			case .Empty:
				return [x]
			case .Destructure(let y, let ys):
				return cmp(x, y) ? y <| insertBy(cmp)(x)(ys) :  x <| l
		}
	} }
}
