Skip to content
Snippets Groups Projects
root.lus 427 B
type state=struct {d:int; par:int} ;
type action=enum{CD,CP};
const actions_number=2;

function action_of_int (i:int) returns (a:action);
let 
a=CD;
tel

function root_enable<<const degree:int>> (r:state ; nl:state^degree) returns
 (al: bool^actions_number) ;
let
al=[r.d<>0,false];
tel

function root_step <<const degree:int>> (r:state ; nl:state^degree ; a:action)
returns (rnew:state);
let
rnew= state {d=0; par=r.par};
tel