Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make predicates public, rename within-with-activity? to has-*activity*?

  • Loading branch information...
commit 826efe7f84dab10aeed4f4a3d047b4995c4a217f 1 parent 5945452
@sattvik authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/clojure/neko/activity.clj
10 src/clojure/neko/activity.clj
@@ -30,13 +30,13 @@
*activity* activity#]
-(defn- activity?
+(defn activity?
"Determines whether the argument is an instance of Activity."
(instance? Activity x))
-(defn- within-with-activity?
- "Ensures that the function is within a valid with-activity form."
+(defn has-*activity*?
+ "Ensures that the calling context has a valid *activity* var."
(and (bound? #'*activity*)
(activity? *activity*)))
@@ -55,7 +55,7 @@
{:pre [(resolvable? id-or-name)
- (within-with-activity?)]
+ (has-*activity*?)]
:post [(or (nil? %)
(instance? View %))]}
(-find-view *activity* id-or-name))
@@ -104,7 +104,7 @@
[activity & features]
{:pre [(or (activity? activity)
(and (keyword? activity)
- (within-with-activity?)))
+ (has-*activity*?)))
(every? keyword? features)]
:post [%
(every? (fn [x] (instance? Boolean x)) %)]}
Please sign in to comment.
Something went wrong with that request. Please try again.