Skip to content

Commit

Permalink
[#200] Add tests for generalized variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Matus Goljer committed Nov 8, 2016
1 parent bcc74b5 commit 07c61f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dev/examples.el
Original file line number Diff line number Diff line change
Expand Up @@ -672,11 +672,13 @@ new list."

(defexamples -first-item
(-first-item '(1 2 3)) => 1
(-first-item nil) => nil)
(-first-item nil) => nil
(let ((list (list 1 2 3))) (setf (-first-item list) 5) list) => '(5 2 3))

(defexamples -last-item
(-last-item '(1 2 3)) => 3
(-last-item nil) => nil)
(-last-item nil) => nil
(let ((list (list 1 2 3))) (setf (-last-item list) 5) list) => '(1 2 5))

(defexamples -butlast
(-butlast '(1 2 3)) => '(1 2)
Expand Down

4 comments on commit 07c61f5

@Wilfred
Copy link
Contributor

@Wilfred Wilfred commented on 07c61f5 Nov 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This will mean they appear in the README when we regenerate the docs -- do you need to do that?

@Fuco1
Copy link
Collaborator

@Fuco1 Fuco1 commented on 07c61f5 Nov 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do that when we finish the task, so all the things get updated at once.

@Fuco1
Copy link
Collaborator

@Fuco1 Fuco1 commented on 07c61f5 Nov 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't get this to compile cleanly: https://travis-ci.org/magnars/dash.el/jobs/175335157 ... it has a problem with void variable in the e23 macro... How could I make it conditionally compile?

@Wilfred
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After much wrangling, I've opened #205.

Please sign in to comment.