lean4-htt/tests/lean/run/forInElabBug.lean
2022-03-23 17:35:04 -07:00

17 lines
381 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Std
namespace Std.BinomialHeapImp
open Heap
partial def toArrayUnordered' (h : Heap α) : Array α :=
go #[] h
where
go (acc : Array α) : Heap α → Array α
| heap ns => Id.run do
let mut acc := acc
for h₁ : n in ns do
acc := acc.push n.val
for h₂ : h in n.children do
acc := go acc h
return acc