                /**  Loading Files Once **/
/*K: Get;Load;Insert */
/*S: Inference Corp */
/*D: March 1985 */
/*A: D Prouty */ 
/*U: October 1985 K McIsaac */
/* Updated to mark file as loaded. Programmer no longer needs to
	put "_filename[Loaded] : 1" at end of file */
 
/*: Loadonce[$file]
	or <<$file loads a file if it has not already been loaded using
	Loadonce. */
 
Sxset["<<",Loadonce,1]
Loadonce_:Tier; Loadonce_:Ldist;
_Loadonce[Pr] : Tier[{[$file] :: Sx["<<",{$file},1]}]

Loadonce[$file]::If[~P[_$file[Loaded]],(Prset[$file,Loaded];Get[$file])]
 
/*: Loadedp[$file]
	Tests if file is loaded using Loadonce*/
Loadedp_:Tier;
Loadedp[$1] :: P[Prop[$1,'Loaded]]

_XLoadonce[Loaded]:1; /* This is the only file to require this statement*/

/*W Files loaded with Get will be reloaded one with Loadonce*/
 
