Skip to content

Commit c5fce9e

Browse files
committed
will add take-last function in it
1 parent 7aa6d8d commit c5fce9e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/practitest_firecracker/query_dsl.clj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@
5555
(throw
5656
(ex-info "Syntax error: 'drop-last' must have one or two arguments"
5757
{:query query})))
58+
'take-last (case (count args)
59+
1 (take-last 1 (first args))
60+
2 (take-last (first args) (second args))
61+
(throw
62+
(ex-info "Syntax error: 'take-last' must have one or two arguments"
63+
{:query query})))
5864
'concat (apply str args)
5965
'capitalize (if (= 1 (count args))
6066
(map string/capitalize (first args))

0 commit comments

Comments
 (0)