let
rec
fill_context
=
function
|
Top
,
e
as
ce
->
e
|
AppL
(
c
,
l
),
e
->
fill_context
(
c
,
App
(
e
,
l
))
|
AppR
((
_
,
e1
),
c
),
e2
->
fill_context
(
c
,
App
(
e1
,
e2
))
|
LetL
(
x
,
c
,
e2
),
e1
->
fill_context
(
c
,
Let
(
x
,
e1
,
e2
));;