let signal_append s1 s2 =
let f = signal_check_frequency s1 s2 in
let new_signal = fun t ->
let temp1 = (signal_fun s1) t in
let temp2 = (signal_fun s2) t in
match (temp1, temp2) with
|(Vec (size1, vec1), Vec (size2, vec2)) ->
let new_vec = fun i -> if i < size1 then vec1 i else vec2 (i - size1) in
make_vector (size1 + size2) new_vec
|_ -> raise (Signal_operation "Append: input signals should be vectors.")
in
(f, new_signal)