lean4-htt/tests/elab/cbv_annotations4.lean
Wojciech Różowski ccef9588ae
feat: add further cbv annotations (#13135)
This PR adds several `cbv_opaque` and `cbv_eval` annotations to the
standard library.
2026-03-26 14:55:40 +00:00

9 lines
229 B
Text

module
public import Init.Data.Array.MinMax
def maxElement (xs : Array Int) : Int :=
xs.max?.getD 0
example : maxElement #[1, 2, 3] = 3 := by cbv
example : maxElement #[5, 3, -5, 2, -3, 3, 9, 0, 124, 1, -10] = 124 := by cbv