add reverse, snippet for prepend implementation

This commit is contained in:
Ava Hahn 2023-03-08 20:59:22 -08:00
parent 6961fcc9fa
commit 928c9b91ed
Signed by untrusted user who does not match committer: affine
GPG key ID: 3A4645B8CF806069
6 changed files with 288 additions and 25 deletions

5
snippets/prepend.rls Normal file
View file

@ -0,0 +1,5 @@
#!/bin/relish
(def prepend 'takes a list and appends an element to the back of it, returns prepended list'
(elem list)
(reverse (append (reverse list) elem)))