ruleset ( G => f; G(s,r) => f(s); G(s,r,t) => f(s); )

define	La 5;		// initial length - main segment
define	Ra 1.15;	// growth rate - main
define	Lb 1.3;		// initial length - lateral segment
define	Rb 1.25;	// growth rate - lateral
define	Lc 3;		// initial length - marginal notch
define	Rc 1.19;	// growth rate - notch

roseleaf(n)		=> [{A(0,0).}][{A(0,1)}],n;
A(t,d)	: d=0		=> .G(La,Ra).[+B(t)G(Lc,Rc,t).}]
				[+B(t){.]A(t+1,d);
A(t,d)	: d=1		=> .G(La,Ra).[-B(t)G(Lc,Rc,t).}]
				[-B(t){.]A(t+1,d);
B(t)	: t>0		=> G(Lb,Rb)B(t-1);
G(s,r)			=> G(s*r,r);
G(s,r,t): t>1		=> G(s*r,r,t-1);
