let signal_nth 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 with
|Vec (size1, vec1) ->
(
match temp2 with
|N i -> vec1 i
|R f ->
raise (Signal_operation "Get: second input signal should be int.")
|Vec (size2, vec2) ->
raise (Signal_operation "Get: second input signal should be int.")
|Zero -> vec1 0
|W ->
raise (Signal_operation "Get: second input signal should be int.")
)
|_ -> raise (Signal_operation "Get: first input signal should be vector.")
in
(f, new_signal)