added list index function

This commit is contained in:
Aidan 2020-08-26 23:45:02 -07:00
parent 12caeedf68
commit fcdde50faa
No known key found for this signature in database
GPG key ID: 327711E983899316
2 changed files with 48 additions and 0 deletions

View file

@ -72,6 +72,15 @@ func GenFuncTable() ast.FuncTable {
ArgLazy: true,
},
"index": &ast.Function{
Function: Index,
Name: "index",
Args: []ast.Token_t{
ast.NUMBER,
ast.LIST,
},
},
"head": &ast.Function{
Function: Head,
Name: "head",