else raise (Signal_operation "frequency not matched.") in
List.fold_left check self#frequency sl
- method private add_memory : int -> unit =
+ method add_memory : int -> unit =
fun (length : int) ->
assert (length >= 0);
if memory_length >= length then ()
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