Back
rest (clj)
(source)variable
(rest coll)
Returns a possibly empty seq of the items after the first. Calls seq on its
argument.
Examples
jepsen-io/jepsen
(ns yugabyte.ycql.bank
(:refer-clojure :exclude [test])
(:require [clojure.tools.logging :refer [debug info warn]]
[clojure.core.reducers :as r]
[jepsen.client :as client]
[jepsen.checker :as checker]
[jepsen.generator :as gen]
[jepsen.tests.bank :as bank]
[jepsen.checker.timeline :as timeline]
[knossos.op :as op]
[clojurewerkz.cassaforte.client :as cassandra]
[clojurewerkz.cassaforte.cql :as cql]
[clojurewerkz.cassaforte.query :as q :refer :all]
[yugabyte.ycql.client :as c]))
(c/defclient CQLBank keyspace []
(setup! [this test]
(c/create-transactional-table
conn table-name
(q/if-not-exists)
(q/column-definitions {:id :int
:balance :bigint
:primary-key [:id]}))
(info "Creating accounts")
(c/with-retry
(cql/insert-with-ks conn keyspace table-name
{:id (first (:accounts test))
:balance (:total-amount test)})
(doseq [a (rest (:accounts test))]
(cql/insert conn table-name
{:id a, :balance 0}))))
hraberg/deuce
(ns deuce.emacs.charset
(:use [deuce.emacs-lisp :only (defun defvar)])
(:require [clojure.core :as c]
[deuce.emacs.alloc :as alloc]
[deuce.emacs.fns :as fns]
[deuce.emacs-lisp.globals :as globals])
(:refer-clojure :exclude []))
(defun define-charset-internal (&rest args)
"For internal use only."
)
(defun encode-char (ch charset &optional restriction)
"Encode the character CH into a code-point of CHARSET.
Return nil if CHARSET doesn't include CH.
(defun set-charset-priority (&rest charsets)
"Assign higher priority to the charsets given as arguments."
)
(defun char-charset (ch &optional restriction)
"Return the charset of highest priority that contains CH.
If optional 2nd arg RESTRICTION is non-nil, it is a list of charsets
from which to find the charset. It may also be a coding system. In
that case, find the charset from what supported by that coding system."
)
(defun decode-char (charset code-point &optional restriction)
"Decode the pair of CHARSET and CODE-POINT into a character.
Return nil if CODE-POINT is not valid in CHARSET.
hraberg/deuce
(ns deuce.emacs.alloc
(:use [deuce.emacs-lisp :only (defun defvar) :as el]
[taoensso.timbre :as timbre
:only (trace debug info warn error fatal spy)])
(:require [clojure.core :as c]
[clojure.walk :as w]
[deuce.emacs-lisp.cons :as cons])
(:refer-clojure :exclude [vector cons list])
(:import [java.util Arrays]
[java.lang.management ManagementFactory MemoryNotificationInfo MemoryType MemoryPoolMXBean]
[javax.management NotificationListener NotificationEmitter Notification]))
(defun make-byte-code (arglist byte-code constants depth &optional docstring interactive-spec &rest elements)
"Create a byte-code object with specified arguments as elements.
The arguments should be the ARGLIST, bytecode-string BYTE-CODE, constant
vector CONSTANTS, maximum stack size DEPTH, (optional) DOCSTRING,
and (optional) INTERACTIVE-SPEC.
The first four arguments are required; at most six have any
significance.
The ARGLIST can be either like the one of `lambda', in which case the arguments
will be dynamically bound before executing the byte code, or it can be an
integer of the form NNNNNNNRMMMMMMM where the 7bit MMMMMMM specifies the
minimum number of arguments, the 7-bit NNNNNNN specifies the maximum number
of arguments (ignoring &rest) and the R bit specifies whether there is a &rest
argument to catch the left-over arguments. If such an integer is used, the
arguments will not be dynamically bound but will be instead pushed on the
stack before executing the byte-code."
)
(defun vector (&rest objects)
"Return a newly created vector with specified arguments as elements.
Any number of arguments, even zero arguments, are allowed."
(object-array objects))
(defun string (&rest characters)
"Concatenate all the argument characters and make the result a string."
;; Guard against interning as we allow modifications of String.value for now.
(apply str characters))
(defun list (&rest objects)
"Return a newly created list with specified arguments as elements.
Any number of arguments, even zero arguments, are allowed."
(apply cons/list objects))
hraberg/deuce
(ns deuce.emacs.casefiddle
(:use [deuce.emacs-lisp :only (defun defvar)])
(:require [clojure.core :as c]
[clojure.string :as s])
(:refer-clojure :exclude []))
(defun capitalize-word (arg)
"Capitalize the following word (or ARG words), moving over.
This gives the word(s) a first character in upper case
and the rest lower case.
With negative argument, capitalize previous words but do not move."
(interactive "p"))
(defun capitalize-region (beg end)
"Convert the region to capitalized form.
Capitalized form means each word's first character is upper case
and the rest of it is lower case.
In programs, give two arguments, the starting and ending
character positions to operate on."
(interactive "r"))
(defun upcase-initials (obj)
"Convert the initial of each word in the argument to upper case.
Do not change the other letters of each word.
The argument may be a character or string. The result has the same type.
The argument object is not altered--the value is a copy."
(s/replace obj #"\w+" #(apply str (s/upper-case (first %)) (rest %))))
(defun capitalize (obj)
"Convert argument to capitalized form and return that.
This means that each word's first character is upper case
and the rest is lower case.
The argument may be a character or string. The result has the same type.
The argument object is not altered--the value is a copy."
(s/capitalize obj))
hraberg/deuce
(ns deuce.emacs
(:require [clojure.core :as c]
[deuce.emacs-lisp :as el]
[deuce.emacs-lisp.globals :as globals])
(:refer-clojure :only [])
(:use [deuce.emacs-lisp :only [and apply-partially catch cond condition-case defconst define-compiler-macro defmacro
defun defvar function if interactive lambda let let* or prog1 prog2 progn quote
save-current-buffer save-excursion save-restriction setq setq-default
unwind-protect while throw]]
[deuce.emacs.alloc]
[deuce.emacs.buffer]
[deuce.emacs.bytecode]
[deuce.emacs.callint]
[deuce.emacs.callproc]
[deuce.emacs.casefiddle]
[deuce.emacs.casetab]
[deuce.emacs.category]
[deuce.emacs.ccl]
[deuce.emacs.character]
[deuce.emacs.charset]
[deuce.emacs.chartab]
[deuce.emacs.cmds]
[deuce.emacs.coding]
[deuce.emacs.composite]
[deuce.emacs.data]
[deuce.emacs.dired]
[deuce.emacs.dispnew]
[deuce.emacs.doc]
[deuce.emacs.editfns]
[deuce.emacs.emacs]
[deuce.emacs.eval]
[deuce.emacs.fileio]
[deuce.emacs.filelock]
[deuce.emacs.floatfns]
[deuce.emacs.fns]
[deuce.emacs.font]
[deuce.emacs.frame]
[deuce.emacs.indent]
[deuce.emacs.insdel]
[deuce.emacs.keyboard]
[deuce.emacs.keymap]
[deuce.emacs.lread]
[deuce.emacs.macros]
[deuce.emacs.marker]
[deuce.emacs.menu]
[deuce.emacs.minibuf]
[deuce.emacs.print]
[deuce.emacs.process]
[deuce.emacs.search]
[deuce.emacs.syntax]
[deuce.emacs.term]
[deuce.emacs.terminal]
[deuce.emacs.textprop]
[deuce.emacs.undo]
[deuce.emacs.window]
[deuce.emacs.xdisp]
[deuce.emacs.xfaces]
[deuce.emacs.xml]))
;; Hack for a predicate in cl.el, this is defined in emacs-lisp/bytecomp.el, which we're not using
(defun byte-compile-file-form (form))
;; ;; AOT cl.el gets confused by this alias
(defalias 'cl-block-wrapper 'identity)
(defmacro declare (&rest _specs) nil)
;; with-no-warnings in byte-run.el needs this
(defun last (list &optional n))
;; subr defines a simpler dolist, which custom uses, which gets redefined by cl-macs.
;; During AOT custom loads the latter dolist definition, requiring 'block' - not yet defined.
;; cl cannot be loaded first, as it depends on help-fns, which depend on custom.
(defmacro block (name &rest body) (cons 'progn body))
;; Hack as delayed-eval doesn't (like some other things) work properly inside let-bindings.
;; Needs to be fixed properly, but let's see if we can get through the boot with this hack.
;; cl-setf-simple-store-p is used in cl-macs/cl-setf-do-modify, delayed-eval call refers to earlier binding 'method'.
(defun cl-setf-simple-store-p (sym form))
;; Same issue in regexp-opt/regexp-opt. Calls this fn with earlier binding 'sorted-strings'
(defun regexp-opt-group (strings &optional paren lax))