module Demote.WhereIn6 where

--A definition can be demoted to the local 'where' binding of a friend declaration,
--if it is only used by this friend declaration.

--Demoting a definition narrows down the scope of the definition.
--In this example, demote the top level 'addthree' to 'fun'
--This example also aims to test the removing of parameters and parentheses.

fun x y z =inc addthree
       where addthree=x+y+z

             inc a =a +1