Public Vars

Back

merge (clj)

(source)

function

(merge & maps)
Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping from the latter (left-to-right) will be the mapping in the result.

Examples

PrecursorApp/precursor
(ns pc.repl
  "Utility functions to make repl access more convenient.
   Also serves as a guide for how nses should be aliased"
  (:require [cemerick.url :as url]
            [cheshire.core :as json]
            [clj-http.client :as http]
            [clj-time.core :as time]
            [clojure.core.async :as async]
            [clojure.java.javadoc :refer (javadoc)]
            [clojure.repl :refer :all]
            [datomic.api :as d]
            [pc.billing :as billing]
            [pc.datomic :as pcd]
            [pc.datomic.web-peer :as web-peer]
            [pc.email :as email]
            [pc.http.plan :as plan-http]
            [pc.http.sente :as sente]
            [pc.models.chat :as chat-model]
            [pc.models.cust :as cust-model]
            [pc.models.doc :as doc-model]
            [pc.models.flag :as flag-model]
            [pc.models.issue :as issue-model]
            [pc.models.layer :as layer-model]
            [pc.models.permission :as permission-model]
            [pc.models.plan :as plan-model]
            [pc.models.team :as team-model]
            [pc.stripe :as stripe]
            [slingshot.slingshot :refer (try+ throw+)]))

(defmacro pomegranate-load [artifact]
  `(do
     (require 'cemerick.pomegranate)
     (cemerick.pomegranate/add-dependencies
      :coordinates '[~artifact]
      :repositories (merge cemerick.pomegranate.aether/maven-central {"clojars" "http://clojars.org/repo"}))))
hraberg/deuce
(ns deuce.emacs.xfaces
  (:use [deuce.emacs-lisp :only (defun defvar)])
  (:require [clojure.core :as c])
  (:refer-clojure :exclude []))

  List values for REPLACEMENT are merged to form the final face
  specification, with earlier entries taking precedence, in the same as
  as in the `face' text property.

  causes EXTRA-FACE... or (FACE-ATTR VAL ...) to be _merged_ with the
  existing definition of FACE.  Note that this isn't necessary for the
  default face, since every face inherits from the default face.

  The definition of `supported' is somewhat heuristic, but basically means
  that a face containing all the attributes in ATTRIBUTES, when merged
  with the default face for display, can be represented in a way that's

(defun merge-face-attribute (attribute value1 value2)
  "Return face ATTRIBUTE VALUE1 merged with VALUE2.
  If VALUE1 or VALUE2 are absolute (see `face-attribute-relative-p'), then
  the result will be absolute, otherwise it will be relative."
  )

(defun internal-merge-in-global-face (face frame)
  "Add attributes from frame-default definition of FACE to FACE on FRAME.
  Default face attributes override any local face attributes."
  )
kit-clj/kit
(ns kit.edge.utils.repl
  (:require
    [clojure.core.server :as socket]
    [clojure.tools.logging :as log]
    [integrant.core :as ig]))

(defmethod ig/prep-key :repl/server
  [_ config]
  (merge {:name "main"} config))
typedclojure/typedclojure
(ns ^:no-doc typed.ann.clojure
  "Type annotations for the base Clojure distribution."
  #?(:cljs (:require-macros [typed.ann-macros.clojure :as macros]))
  (:require [clojure.core :as cc]
            [typed.clojure :as t]
            #?(:clj [typed.ann-macros.clojure :as macros])
            #?(:clj typed.ann.clojure.jvm) ;; jvm annotations
            #?(:clj clojure.core.typed))
  #?(:clj
     (:import (clojure.lang PersistentHashSet PersistentList
                            APersistentMap #_IPersistentCollection
                            #_ITransientSet
                            IRef)
              (java.util Comparator Collection))))

cc/merge-with (t/All [k v] (t/IFn [[v v :-> v] nil :* :-> nil]
                                  [[v v :-> v] (t/Map k v) :* :-> (t/Map k v)]
                                  [[v v :-> v] (t/Option (t/Map k v)) :* :-> (t/Option (t/Map k v))]))

cc/merge (t/All [k v] (t/IFn [nil :* :-> nil]
                             [(t/Map k v) (t/Nilable (t/Map k v)) :* :-> (t/Map k v)]
                             [(t/Option (t/Map k v)) :* :-> (t/Option (t/Map k v))]))
unclebob/FunctionalDesign
(ns gossiping-bus-drivers-clojure.core-spec
  (:require [speclj.core :refer :all]
            [gossiping-bus-drivers-clojure.core :refer :all]))

  (it "merges rumors"
    (should= [{:name "d1" :rumors #{:r2 :r1}}
              {:name "d2" :rumors #{:r2 :r1}}]
             (merge-rumors [{:name "d1" :rumors #{:r1}}
                            {:name "d2" :rumors #{:r2}}])))