module Language.Noodle.Lib.Function(env,decls) where

import Language.Noodle.Evaluation



env   = extenv decls

decls = [("<-", extop revApp)
         ,("id", extfun fid)]

revApp (Function f) v = f v
revApp other _        = return $ other -- maintain the semantics of applying non-functions
fid x = return x