Public Vars

Back

find (clj)

(source)

function

(find map key)
Returns the map entry for key, or nil if key not present.

Examples

jonase/eastwood

;; Clojure 1.6.0 with the :require below causes clojure.core/load-lib
;; to be called with the arguments: prefix=nil, lib=eastwood.util,
;; options=(:as :require true). When it tries to call (apply hash-map
;; option) with an odd number of arguments, it throws the exception:

;; This makes sense upon seeing the value of options, but it is a very
;; confusing error message that does not help find the source of the
;; problem.
PrecursorApp/precursor
(ns pc.http.routes.api
  (:require [cemerick.url :as url]
            [cheshire.core :as json]
            [clojure.core.memoize :as memo]
            [clojure.string :as str]
            [clojure.tools.reader.edn :as edn]
            [crypto.equality :as crypto]
            [defpage.core :as defpage :refer (defpage)]
            [pc.auth :as auth]
            [pc.crm :as crm]
            [pc.datomic :as pcd]
            [pc.early-access]
            [pc.http.doc :as doc-http]
            [pc.http.team :as team-http]
            [pc.http.handlers.custom-domain :as custom-domain]
            [pc.models.chat-bot :as chat-bot-model]
            [pc.models.doc :as doc-model]
            [pc.models.flag :as flag-model]
            [pc.models.team :as team-model]
            [pc.profile :as profile]
            [ring.middleware.anti-forgery :as csrf]
            [slingshot.slingshot :refer (try+ throw+)]))

          (seq (team-model/find-by-subdomain (pcd/default-db) subdomain))
          {:status 400 :body (pr-str {:error :subdomain-exists
                                      :msg "Sorry, that subdomain is taken. Please try another."})}
hraberg/deuce
(ns deuce.emacs.dired
  (:use [deuce.emacs-lisp :only (defun defvar)])
  (:require [clojure.core :as c]
            [clojure.java.io :as io]
            [deuce.emacs-lisp.cons :as cons])
  (:import [java.io File])
  (:refer-clojure :exclude []))

(defun directory-files (directory &optional full match nosort)
  "Return a list of names of files in DIRECTORY.
  There are three optional arguments:
  If FULL is non-nil, return absolute file names.  Otherwise return names
   that are relative to the specified directory.
  If MATCH is non-nil, mention only file names that match the regexp MATCH.
  If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
   Otherwise, the list returned is sorted with `string-lessp'.
   NOSORT is useful if you plan to sort the result yourself."
  (cons/maybe-seq
   ((if nosort identity sort)
    (filter (if match
              #(re-find (re-pattern
                         ((ns-resolve 'deuce.emacs.search
                                      'emacs-regex-to-java) match)) %)
              identity)
            (map (fn [^File f]
                   (if full
                     (.getCanonicalPath f)
                     (.getName f)))
                 (.listFiles (io/file directory)))))))
hraberg/deuce
(ns deuce.emacs.indent
  (:use [deuce.emacs-lisp :only (defun defvar)])
  (:require [clojure.core :as c]
            [deuce.emacs.buffer :as buffer]
            [deuce.emacs.data :as data]
            [deuce.emacs.editfns :as editfns])
  (:refer-clojure :exclude []))

  For example, to find the buffer position of column COL of line LINE
  of a certain window, pass the window's starting location as FROM
  and the window's upper-left coordinates as FROMPOS.
  Pass the buffer's (point-max) as TO, to limit the scan to the end of the
  visible section of the buffer, and pass LINE and COL as TOPOS."
  )
hraberg/deuce
(ns deuce.emacs.font
  (:use [deuce.emacs-lisp :only (defun defvar)])
  (:require [clojure.core :as c])
  (:refer-clojure :exclude []))

(defun find-font (font-spec &optional frame)
  "Return a font-entity matching with FONT-SPEC on the current frame.
  Optional 2nd argument FRAME, if non-nil, specifies the target frame."
  )