add reverse, snippet for prepend implementation
This commit is contained in:
parent
6961fcc9fa
commit
928c9b91ed
6 changed files with 288 additions and 25 deletions
5
snippets/prepend.rls
Normal file
5
snippets/prepend.rls
Normal 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)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue