RosettaCodeData/Task/History-variables/Phix/history-variables-2.phix
2024-11-04 21:53:44 -08:00

19 lines
428 B
Text

-- history.e
sequence histories = {}
global function new_history_id(object v)
histories = append(histories,{v})
return length(histories)
end function
global procedure set_hv(integer hv, object v)
histories[hv] = append(histories[hv],v)
end procedure
global function get_hv(integer hv)
return histories[hv][$]
end function
global function get_hv_full_history(integer hv)
return histories[hv]
end function