Question: Arrow operator or unapply ?

Hi,

I naively thought that
f := t -> Some expression containing t
and
f := unapply(Some expression containing t, t)
where two different ways to define the same function f.

 

Recently I defined f and g this way
X := RandomVariable(Normal(m, s)):
U := Sample(X, 30000) ;  
f := t -> PDF(X, t);
g := unapply(PDF(X, t), t);

Could you explain me why f~(U) exectues in about 10 seconds and g~(U) in less than 0.1 s ?

Thanks in advance

 

 

Please Wait...