RosettaCodeData/Task/Arrays/AntLang/arrays.antlang
2016-12-05 23:44:36 +01:00

13 lines
251 B
Text

/ Create an immutable sequence (array)
arr: <1;2;3>
/ Get the head an tail part
h: head[arr]
t: tail[arr]
/ Get everything except the last element and the last element
nl: first[arr]
l: last[arr]
/ Get the nth element (index origin = 0)
nth:arr[n]