WHNF evaluates far enough to reach a data constructor or lambda function.
If you have a lambda function that hasn't been called with an argument, you cannot evaluate it any further anyway. So a lambda function is in WHNF, and indeed NF, since there is nothing to evaluate further. Now, if you call the lambda function with an argument, we can evaluate what the result might be. But the lambda function on its own? Nothing further to be done.
Your first expression is a lambda function with no arguments. It is therefor in normal form.
Your second expression is neither a data constructor nor a lambda, hence is not in any normal form. Now, if you evaluate it for one step, you obtain
'P' : ("apu" ++ "chon")
Which (although the syntax doesn't look like it) begins with a data constructor (namely (:)
), and hence is in WHNF, but not NF (since it still contains the unevaluated (++)
subexpression).
Perhaps it's easier if we get rid on the infix syntax:
(++) "Papu" "chon"
vs
(:) 'P' ( (++) "apu" "chon" )