• Clojure
  • 13 lines
  • 5 forks
  • Pasted by anonymous on October 4, 2013
(ann target-flag? (Fn [Session Keyword -> boolean]
                      [Keyword -> [Session -> (Vector* boolean Session)]]))
(defn target-flag?
  "Predicate to test if the specified flag is set for target."
  ([session flag]
     (when-let [flags (get-settings
                       (get session :plan-state) (target-id session) :flags
                       {:default #{}})]
       (logging/tracef "target-flag? flag %s flags %s" flag flags)
       (flags flag)))
     (fn [session]
       [(target-flag? session flag) session])))

Did you know? CLOSE

  • There are keyboard shortcuts!
    • When Creating A Paste
      • ALT+P Toggle Private
      • CTRL+Enter Create Paste
      • ALT+W Toggle word wrap
    • When Viewing A Paste
      • ALT+G Go to a line
      • ALT+CTRL+E Edit the paste
      • ALT+R Show the raw code
  • There are URL options!
    • When Creating A Paste
      • ?lang=Javascript to default to javascript
    • When Viewing A Paste
      • #L-N Jump to line number N