Theory Data_Function

section ‹Data: Functions›

theory Data_Function
  imports HOLCF_Main
begin

fixrec flip :: "('a -> 'b -> 'c) -> 'b -> 'a -> 'c" where
  "flipfxy = fyx"

fixrec const :: "'a  'b  'a" where
  "constx_ = x"

fixrec dollar :: "('a -> 'b) -> 'a -> 'b" where
  "dollarfx = fx"

fixrec dollarBang :: "('a -> 'b) -> 'a -> 'b" where
  "dollarBangfx = seqx(fx)"

fixrec on :: "('b -> 'b -> 'c) -> ('a -> 'b) -> 'a -> 'a -> 'c" where
  "ongfxy = g(fx)(fy)"

end