Add Version and Package-Requires to files #45

master
Magnar Sveen 13 years ago
parent 9b0166a3a1
commit 6d0a8d6707
  1. 2
      dash-functional.el
  2. 15
      dash.el

@ -4,6 +4,8 @@
;; Authors: Matus Goljer <matus.goljer@gmail.com>
;; Magnar Sveen <magnars@gmail.com>
;; Version: 1.8.0
;; Package-Requires: ((dash "1.8.0") (emacs "24"))
;; Keywords: lisp functions combinators
;; This program is free software; you can redistribute it and/or modify

@ -3,6 +3,7 @@
;; Copyright (C) 2012 Magnar Sveen
;; Author: Magnar Sveen <magnars@gmail.com>
;; Version: 1.8.0
;; Keywords: lists
;; This program is free software; you can redistribute it and/or modify
@ -26,13 +27,6 @@
;;; Code:
(defalias '-first-item 'car
"Returns the first item of LIST, or nil on an empty list.")
(defun -last-item (list)
"Returns the first item of LIST, or nil on an empty list."
(car (last list)))
(defmacro !cons (car cdr)
"Destructive: Sets CDR to the cons of CAR and CDR."
`(setq ,cdr (cons ,car ,cdr)))
@ -307,6 +301,13 @@ To get the first item in the list no questions asked, use `car'."
"Return the last x in LIST where (PRED x) is non-nil, else nil."
(--last (funcall pred it) list))
(defalias '-first-item 'car
"Returns the first item of LIST, or nil on an empty list.")
(defun -last-item (list)
"Returns the first item of LIST, or nil on an empty list."
(car (last list)))
(defmacro --count (pred list)
"Anaphoric form of `-count'."
(let ((r (make-symbol "result")))

Loading…
Cancel
Save