X-Git-Url: https://scm.cri.mines-paristech.fr/git/Faustine.git/blobdiff_plain/14e4f8cd6102d273c520c2d2e0168a5221a7daeb..a6a80a5868c766f1a5360fd27f132fad425f8fe5:/interpretor/signal.ml?ds=sidebyside diff --git a/interpretor/signal.ml b/interpretor/signal.ml index b8f0e68..ae312b0 100644 --- a/interpretor/signal.ml +++ b/interpretor/signal.ml @@ -141,10 +141,11 @@ class signal : int -> (time -> value_type) -> signal_type = method prefix : signal_type -> signal_type = fun (s_init : signal_type) -> + let () = self#add_memory 1 in let func : time -> value_type = fun t -> if t = 0 then s_init#at 0 - else if t > 0 then self#at t + else if t > 0 then self#at (t - 1) else raise (Signal_operation "prefix time < 0.") in new signal self#frequency func