Weak Head Normal Form. This means a redex may appear inside a lambda body. Web weak head normal form.
STEVEN CHABEAUX Creating the Head Normal map
An expression in weak head normal form has been evaluated to the outermost data constructor or lambda abstraction (the head). A term in weak head normal form is either a term in head normal form or a lambda abstraction. Reduction strategies [ edit ] Normal form means, the expression will be fully evaluated. Web weak head normal form. Whnf [ (\x.y) z ] = false (1) whnf [ \x. Web the first argument of seq is not guaranteed to be evaluated before the second argument. Seq is defined as follows. Aside from a healthy mental workout, we find lambda calculus is sometimes superior: (f x) ] = false (2) whnf [ x y ] = whnf [ x ] (3) in all other cases whnf [x] = true (4)
Therefore, every normal form expression is also in weak head normal form, though the opposite does not hold in general. Whnf [ (\x.y) z ] = false (1) whnf [ \x. But more importantly, working through the theory from its original viewpoint exposes us to different ways of thinking. An expression is in weak head normal form (whnf), if it is either: The evaluation of the first argument of seq will only happen when the. Web reduce terms to weak normal forms only. Web the first argument of seq is not guaranteed to be evaluated before the second argument. A constructor (eventually applied to arguments) like true, just (square 42) or (:) 1. But then i read this wikipedia article where whnf is defined for the lambda calculus as follows: Aside from a healthy mental workout, we find lambda calculus is sometimes superior: Section 6 de ne these normal forms.