diff options
| author | Danil-Zaripov <catharsiandev@gmail.com> | 2026-03-06 21:47:22 +0300 |
|---|---|---|
| committer | Danil-Zaripov <catharsiandev@gmail.com> | 2026-03-07 12:51:51 +0300 |
| commit | 4caf4984763dd50d2bcc2f8127296df6587ea891 (patch) | |
| tree | 0226352b3495d7318dd7295d3c6152ae2e489aa8 /src/ast.h | |
| parent | 28703bd92c53e28ed020c2c24820a14c1c468c57 (diff) | |
| download | inpla-4caf4984763dd50d2bcc2f8127296df6587ea891.tar.gz inpla-4caf4984763dd50d2bcc2f8127296df6587ea891.zip | |
Improve list parsing
The previous algorithm was O(n^2)
Diffstat (limited to '')
| -rw-r--r-- | src/ast.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -46,6 +46,8 @@ Ast *ast_makeSymbol(char *name); Ast *ast_makeInt(long num); Ast *ast_makeAST(AST_ID id, Ast *left, Ast *right); Ast *ast_makeTuple(Ast *tuple); +Ast *ast_reverseList(Ast *l); +Ast *ast_addFirst(Ast *l, Ast *p); Ast *ast_addLast(Ast *l, Ast *p); Ast *ast_getNth(Ast *p,int nth); Ast *ast_getTail(Ast *p); |
