amic classloader stuff still going on?
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this gro
"in addition to the String" is important
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from
gular 'read' function can read these *print-dup* strings to
reproduce the original structure, a.k.a. deserialize:
(def my-data (with-in-str my-string (read)))
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
xample:
user=> (re-seq (re-pattern (str "a" ".*")) "bab")
("ab")
But remember that you may need extra backslashes inside the "string"
parts, compared to the equivalent #"regex" literal.
Or if each piece of your regex can stand alone, you could tak
Google groups files section is having issues.
Here's 'reduction' as discussed in IRC, mostly written by Rich.
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To
On Fri, Dec 5, 2008 at 10:50 AM, Chouser <[EMAIL PROTECTED]> wrote:
> Google groups files section is having issues.
> Here's 'reduction' as discussed in IRC, mostly written by Rich.
I messed it up anyway -- tried to use if-let too early.
Try thi
On Fri, Dec 5, 2008 at 11:07 AM, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
> I'm working on that. It has utility even outside traditional reactive
> contexts, in moving the imperative part of your logic outside of your state
> transformation function. I think it'
Third time's charm? The previous versions of 'reduction' returned nil
for empty collection when no init was given. This version follows
'reduce' more closely, calling the given function with no arguments:
user=> (re
On Fri, Dec 5, 2008 at 9:55 PM, Chouser <[EMAIL PROTECTED]> wrote:
> Third time's charm?
Apparently not. Previous versions had a couple problems.
One was that when when no init was provided, the first element of the
collection was not emitted by itself. This is inconsistent
azy-cons (first coll) (map f (reduction f coll) (rest coll)))
(cons (f) nil)))
([f init coll]
(lazy-cons init (map f (reduction f init coll) coll
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
ack frames for the nth result?
Anyway, either of the definitions presented together work fine for
large collections and appear to operate in O(n) as you'd expect.
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goog
a
> giant chain of lazy-conses:
>
> clojure.core$filter__3364$fn__3367
This may not be worth much, but can you see the data members of that
object? It's not itself the head of a cons chain, presumably, so I'm
wondering if the data member that *is* at t
")
> java.lang.ClassCastException: clojure.lang.LazyCons cannot be cast to
> clojure.lang.IFn (zipper-test.clj:35)
>
>
> What might explain this?
Hard to guess with just a single line from a stack trace on an unknown
.clj file, but I wouldn't be shocked if
bsorbed, though, I noticed that although
my blog appears to be included in that diagram, none of my blog posts
appear in the feed. I couldn't figure out how to examine the pipe to
see the source of the problem.
--Chouser
--~--~-~--~~~---~--~~
You received this
the head of the seq.
Fixing this is hard becasue RT.count() is holding onto the head as
well. I've attached a patch that fixes the problem, but it's pretty
ugly, perhaps only useful to demonstrate that this is the problem.
--Chouser
--~--~-~--~~~---~--~---
thinking is that if the :while is false,
there's no need to check the :when.
Is this Good, and should 'for' work the same way?
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure&quo
On Mon, Dec 8, 2008 at 10:42 AM, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
> On Dec 8, 10:08 am, Chouser <[EMAIL PROTECTED]> wrote:
>>
>> doseq currently supports both. If both appear on the same binding,
>> the :while is always test first regardless of the
'foo
{:tag clojure.lang.MultiFn, :name foo, :file "NO_SOURCE_FILE", :ns
#, :line 1, :b 2, :a 1}
I'm not offering an opinion here on whether or not it's a good patch,
just wanted to point out it changes currently defined behavior.
--Chouser
--~--~-~--~~
On Mon, Dec 8, 2008 at 10:42 AM, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
> On Dec 8, 10:08 am, Chouser <[EMAIL PROTECTED]> wrote:
>>
>> doseq currently supports both. If both appear on the same binding,
>> the :while is always test first regardless of the
our code looks fine -- nearly identical to 'assoc-in' in fact. It
does the destructuring right in the function arguments, but everything
else is merely stylistic differences.
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are su
r XML and act as if you wrote:
(xml-> atom1 (tag= :entry) (tag= :author) (tag= :name) text)
A primary benefit of not having a special syntax is that it's easy to
drop in custom filtering and mapping functions. For example, get the
titles of atom entr
eeply committed to emacs
or vim. It already has an 'open' function to pull up the source of a
function in the edit pane.
I'm not ready to provide a link yet, but go ahead and ask me in a few
weeks how "textjure" is coming along.
--Chouser
--~--~-~--~~-
On Wed, Dec 10, 2008 at 4:01 PM, J. McConnell <[EMAIL PROTECTED]> wrote:
>
> On Wed, Dec 10, 2008 at 3:35 PM, Chouser <[EMAIL PROTECTED]> wrote:
>>
>> It's by no means emacs *or even vim* yet
>
> Ouch, that hurts ;)
I'm a vim user, but although I do
namespace-qualified:
user=> (namespace :foo)
nil
user=> (namespace :my-ns/foo)
"my-ns"
user=> (namespace ::foo)
"user"
The idea of using this feature to specify XML namespaces has been
discussed. Rich even adjusted the reader rules to allow fully-qualified
URLs as
t; "short" "message"])
> -> ("A" "SHORT" "MESSAGE")
>
> Are they cases where we cannot use the second form and the first is
> required?
'memfn' predates the #(...) syntax and is unnecessary now, I think.
--Chouser
--~--~
f this. I
think it's often desirable to also maintain (somewhere) the original
document's shortcut names, and use those where applicable when
emitting XML text again.
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
he namespace-is-
> file change. Are people still using releases that require the old
> contrib directories, or can we safely delete them?
+1 The dirs are a bit confusing, and people can always get an old svn
revision if they really must.
--Chouser
--~--~-~--~~~-
This is good! Please send in your Contributor Agreement so this patch
can be checked in.
http://clojure.org/contributing
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to th
ms in coll for which
(pred item) returns true. pred must be free of side-effects."
[pred coll]
(when (seq coll)
(if (pred (first coll))
(lazy-cons (first coll) (filter pred (rest coll)))
(recur pred (rest coll)
nil
u
uf (BufferedReader. (InputStreamReader. System/in))]
(let [words (for [line (line-seq buf)] (.split line " "))]
(print-words (sort-words (reduce read-words {} words))
(time (read-input))
--Chouser
--~--~-~--~~~---~--~~
You received this
your classpath for
'source' to work. I thought that they were no longer included in the
clojure.jar, but checking just now they appear to still be there.
Anyway, if 'source' prints "Source not found" for a Var you know to be
defined an
ion you're sending to each agent. If you were
maintaining a reference to each agent, you'd be able to dereference
any of them and see it has errors:
user=> (def x (agent nil))
#'user/x
user=> @x
nil
user=> (send-off x nil)
#
user=> @x
java.lang.Exception: Agent has
t; (dosync (commute year inc
> (report)
Note that you've now got popsize*9 agents, and the actions in your
vector are not guaranteed to happen in order for any given 'i' -- I
don't know if that matters to you or not.
--Chouser
--~--~-~--~~~-
ed to create them:
http://github.com/Chouser/clojure-classes/tree/master
For a quick link to the main graphic, you can use:
http://tinyurl.com/clojure-classes
I won't be maintaining the chart.png in the file upload area of this
group, since it's much easier to just push new version
clj used by anything
> or is it obsolete code?
It's obsolete and has been removed from the latest version of
clojure-contrib. See clojure/contrib/test_is.clj for the latest
version of that lib.
--Chouser
--~--~-~--~~~---~--~~
You received this message
does not re-encode them:
Good catch. I've added a fix to clojure.contrib.lazy-xml (svn 300),
but the issue is still open for clojure.xml
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure&quo
nterfaces.
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to
clojure+unsubscr.
On Mon, Dec 15, 2008 at 11:02 AM, Chouser wrote:
> On Mon, Dec 15, 2008 at 10:47 AM, Rich Hickey wrote:
>>
>> It seems the interface detection is not quite right - many things that
>> are interfaces are shown as classes.
>
> Yes, the legend is misleading. D
user=> ('+ '1)
nil
user=> ('+ '1 '2 '3)
java.lang.IllegalArgumentException: Wrong number of args passed to:
Symbol (NO_SOURCE_FILE:0)
user=> ('b '{a 10, b 11, c 12})
11
--Chouser
--~--~-~--~~~---~--~~
You received this mes
he 'ns' macro (depending on whether you specify
:refer-clojure or not). However 'in-ns', 'refer', 'require', and
'use' are lower-level functions and for use in the REPL.
--Chouser
--~--~-~--~~~---~--~~
You received this
ource /x/y/z.clj. The root
resource should contain code to create the lib's namespace and load any
additional lib resources.
In general, clojure-contrib is a good place to look to find examples
of properly laid-out libs, as well as generally idiomatic Clojure
code.
--Chouser
--~--~---
On Mon, Dec 15, 2008 at 11:54 AM, Peter Wolf wrote:
>
> I get the following error when I try ANTS.CLJ. Has something changed?
Recent Clojure from SVN and a recent download of ants.clj from the
google group seem to work fine together for me.
--C
message "java.lang.Exception: Unable to
> resolve symbol: gen-and-load-class in this context (throwException.clj:
> 1)".
>
> I have tried to load the file "clojure-path/classes/clojure/
> genclass.clj" but I still cannot use "gen-and-load-class".
>
> Can anyo
know
weren't really claiming otherwise, it's just a possible point of
confusion.
Perhaps:
Answer: Because it expands to "(fn [x] ([x]))". #() always expands to
include parens around the expression you give it. You might try
#(vector x) instead.
--Chouser
--~--~-~--~~
;~ns s#)))
>> > > (require :reload-all '~ns)))
This has come up before:
http://clojure-log.n01se.net/date/2008-11-04.html#13:59
Do you want to remove only the public vars, or all of them?
(defn ns-unmap-all [nspc]
(doseq [[n v] (ns-interns nspc)]
(ns-unmap nspc n)))
ou answer this question as well.
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from th
On Wed, Dec 17, 2008 at 2:10 PM, Randall R Schulz wrote:
>
> Since Chouser asked on #clojure which REPL (I was using the Contrib
> REPL), I tried this with the stock REPL and the hang does not occur.
Specifically, this line causes the JVM to shut down, even if there are
agent threads
efined by Clojure, so still an error if allowed
> to get evaluated.
>
> Things like your sql would be macros that handled (unquote x)
> internally.
I very much like the sound of this.
+1
--Chouser
--~--~-~--~~~---~--~~
You received this message because
gt; greatly improved on. I don't really care for the extremely obfuscated
> examples. Sure, it's neat how far Perl can take things, but it's
> gibberish to me. I tried to follow a middle ground between terse and
> readable and constrained myself to Clojure only (no con
On Wed, Dec 17, 2008 at 9:53 PM, Mark Engelberg
wrote:
>
> This shaves 14 characters off of Chouser's solution:
> (defn enc[s e](apply str(map(apply hash-map(take-nth 2 e))s)))
Very nice!
--Chouser
--~--~-~--~~~---~--~~
You received this message b
ake-nth 2 e)}s)))
But here's a form that works, oddly, and still manages to shave off a
couple chars:
(defn enc[s e](apply str(map`{0~@(cons 0(take-nth 2 e))}s)))
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goog
ads used by 'send' doesn't grow with demand, so too many blocking
threads could cause new 'send' calls to queue up unnecessarily.
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Group
r now it seems we'll have to make do with "normal" mechansims
like SQL libraries.
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clo
7;user)
> #
> howdy>
>
> Switching to another ns corrects it.
We now have several Repls, and each acts slightly differently. I
couldn't reproduce this with clojure.lang.Repl. I'm guessing from
your prompt that you're using emacs/slime. Is that correct?
--Chouser
--~--~
272 587273)
>> (587273 587274) user=> java.lang.OutOfMemoryError: Java heap space
> [...]
>
> Actually, I suppose that's because it's printing the whole thing out?
It's easy enough to test:
user=> (nth (partition 2 1 (iterate inc 1)) 1000)
(1001 1002)
--Chous
'await' for now.
Another option, as long as you don't tell Rich, is that you could
abuse the validator function to send to your agent.
Anyway, apparently watchers for Refs are planned, so you could just
wait for that.
--Chouser
--~--~-~--~~~---~--~~
tions from some other already-loaded namespace into
your current namespace.
'use' does both in one step (use can use the :verbose flag to see it do
this)
All of these are for working with namespaces defined via Clojure code.
'import' is different in that it
just the docs. Regardless, this is a good explanation.
As far as I can tell, libs aren't really documented anywhere (besides
in the docs strings for 'ns' and the various helper function). If
I've missed it somewhere, please correct me, but I
o do) itself, and then return the whole
new state.
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To u
me. However, the set of internal escape sequences recognized by
each are different. For example \w means 'whitespace' in a regex (and
is colored differently from the rest of the regex by vim in perl code)
but is currently illegal in a Clojure string.
--Chouser
--~--~-~--~~---
seqs separately is much of a win.
This combines the entire operation into a single function:
(defn multiplication-table-string [n]
(let [r (range 1 (inc n))]
(apply str (for [y r]
(apply str (concat (for [x r] (format "% 3d" (* x y)))
["\n&quo
s
names, aliases, etc.
> "Symbols and keywords have two parts: a namespace part, which may be
> nil or a string; and a name part, which is a string."
I tried very very hard, but couldn't find anything to complain about
for this one. :-)
Thanks for taking the initiative, Stuart.
--Ch
ask-switching
overhead, or anything ugly like that.
In short, it's ok to have a lot of agents, and to queue up a lot of
work for them.
'send-off' uses a different thread pool that does grow the more
'send-off's you do. I don't know its exact performance profile, b
ay to get the error at compile
time is to eval the args -- and is that still compile time? Anyway,
I'd agree that for (B) something like option (1) (but without the
quoted args) would be the best.
> Or is it considered bad form to throw exceptions at mac
s this.
>
> Feedback welcome on its utility for macro writers.
Here's an example of one way to use it:
user=> (where (and (> i (- 3 1)) (< i ~(+ 3 1
"where i > 3 - 1 and i < 4"
user=> (let [my-name "'chouser'"] (where (and (> id 0)
I've also updated the code for "modern" Clojure, including stylistic
changes, plus some other changes that turned out to be mostly
gratuitous. Anyway, here it is. To run:
java -cp clojure.jar clojure.lang.Repl snake.clj
--Chouser
--~--~-~--~~~-
nsidered it, but wasn't sure it was right. There are
two mutable objects, after all -- do they not need to be coordinated?
I realize that in a program like this it doesn't really matter, and
maybe that's part of my problem.
Great use of :grow instead of 'true' when calli
On Thu, Dec 25, 2008 at 5:52 PM, Emeka wrote:
> Exception in thread "AWT-EventQueue-0"
> java.lang.UnsupportedOperationException: keyReleased
It was to avoid this exception that my version included an empty
implementation of keyRele
On Fri, Dec 26, 2008 at 4:40 AM, Emeka wrote:
> Chooser,
"Chouser"
> Please send me yours then.
Already did:
http://groups.google.com/group/clojure/msg/4f00d2a3b5da8444
And Mr. Gilardi improved on it here:
http://groups.google.com/group/clojure/msg/90316675320
ooked
like:
(ns word-count
(:require [clojure.contrib.duck-streams :as ds]))
...and later...
(ds/spit ...)
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group
; form for use within the
function. This allows the (slightly repetitive) pattern:
(defn str-up-to [n]
(let [foo (fn foo [i]
(str i ","
(when (< i n)
(foo (inc i)]
(foo 0)))
Note there are much better ways to do th
this can
generally be done with Ctrl-D. In a Script, use (shutdown-agents). I
imagine this ought to be done by the same level of code that calls
parallel-top-words, since p-t-w itself can't know that no other agent
work is being done.
--Chouser
--~--~-~--~~~--
idding.
Note that because I didn't use a mutable object for myState, (instead
using the string "this is my state"), there's no way to change the
value of myState.
user=> (compile 'net.n01se.MyThread)
net.n01se.MyThread
user=> (def x (net.n01se.MyThread.))
Conversely,
tutorial-style code may be very useful in appropriate contexts, but is
hardly ever fun to write.
...and now this post is at an extreme of the verbosity scale. Sorry
all, I'll quit now before I get any further behind.
--Chouser
--~--~-~--~~~---~--~--
I also
was careful to refer to the global nature of the Vars, not anything
about const-ness.
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email t
u do this in Clojure?
The example I posted does exactly this -- the name of all MyThreads
start as "my derived class" as demonstrated by:
user=> (.getName x)
"my derived class"
--Chouser
--~--~-~--~~~---~--~~
You received this message becaus
uses a single StringBuilder internally when given more
than 1 argument, so it's much more efficient to call (apply str foo)
than (reduce str foo) for large collections.
user=> (time (last (reduce str (range 3
"Elapsed time: 5570.028441 msecs"
\9
user=> (time (last (ap
On Tue, Dec 30, 2008 at 1:24 AM, falcon wrote:
>
> How's textjure coming along?
Not ready yet. :-/ Current sub-project: setting up sufficiently
flexible system to handle vi-style keybindings.
--Chouser
--~--~-~--~~~---~--~~
You received this mess
:-)
As far as I know, this is not currently possible with gen-class.
Seems like you'd need some kind of post-constructor hook, provided
just to deal with mutable state of the base class.
I wonder if Rich would accept a patch providing an :after-ctor option
to gen-class.
--Chouser
--~-
ded for
self-sending agents:
user=> (defn act [i] (Thread/sleep 1000) (prn i) (send-off *agent* act) (inc i))
#'user/act
user=> (send-off (agent 100) act)
#
user=> 100
101
102
103
(defn act [i])
#'user/act
user=> 104
After the manual 'send-off', a number was printe
l)
(if (pred (first coll))
(lazy-cons (first coll) (filter pred (rest coll)))
(recur pred (rest coll)
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To p
e distracting _ and the extra 'println', and also
allows us to use the optional args for 'range':
(plot #(* % %) 8)
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojur
(if (zero? i)
true
(my-odd? (dec i))
(my-odd? 4))
Ick. But perhaps a macro could make style less terrible to use?
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
&qu
ge 0 10))
Works for me, SVN 1193
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group
On Thu, Jan 1, 2009 at 6:40 PM, Christian Vest Hansen
wrote:
>
> On Thu, Jan 1, 2009 at 11:48 PM, Chouser wrote:
>>
>> On Thu, Jan 1, 2009 at 2:47 PM, Rock wrote:
>>>
>>> Given that there's nothing like letrec in Clojure, and that let acts
>>&
I've added shell-out to clojure-contrib, with an 'sh' function that
allows usage like:
user=> (use '[clojure.contrib.shell-out :only (sh)])
nil
user=> (print (sh "ls" "-l"))
total 1316
drwxrwxr-x 5 chouser chouser 4096 2008-12-16 11:32 classes
d
(9 10 11 12 13) (10 11 12 13 14))
For this particular example, you could use 'partition':
(take 10 (partition 5 1 (iterate inc 1)))
> Does this fn already exist in clojure? If not what would an idiomatic name
> be for it from Has
is isn't in clojure.core yet (any reason why not?) so would you mind
if I add it to clojure.contrib.seq-utils? Or of course you can do it
if you prefer. :-)
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Group
On Thu, Jan 1, 2009 at 11:23 AM, Meikel Brandmeyer wrote:
> a long overdue release of VimClojure is available.
Thanks, works great!
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure&qu
worse than a lack of comments,
especially in code meant to teach.
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To uns
n Fri, Jan 2, 2009 at 4:47 PM, Mark Volkmann wrote:
>
> On Fri, Jan 2, 2009 at 3:09 PM, Chouser wrote:
>>
>> On Fri, Jan 2, 2009 at 4:05 PM, Tom Ayerst wrote:
>>> That def inside a function doesn't look right but I'm a noob at this too. I
>>>
On Fri, Jan 2, 2009 at 5:20 PM, Mark Volkmann wrote:
>
> On Fri, Jan 2, 2009 at 4:04 PM, Chouser wrote:
>>
>> I don't feel I have much authority in the realm of designing
>> concurrent programs, but here are a couple thoughts:
>>
>> It seems to me that
tch that adds even-ness and related assertions to a
bunch of core macros. It introduces a private macro 'assert-args'
that allows these checks without too much impact on the verbosity and
readability of the code.
--Chouser
--~--~-~--~~~---~--~~
You received th
that it's much faster than =, and responds well to
working with primitive numbers:
(time (dotimes [_ 123456789] (= 1 1.0))) ==> 1350.525414 msecs
(time (dotimes [_ 123456789] (== 1 1.0))) ==> 18.603425 msecs
(time (dotimes [_ 123456789] (== (int 1) (float 1.0 ==> 10.348273 ms
-state)
Of course these could be wrapped in regular functions as
well get a more idiomatic api.
Finally, if this is just too clumsy, I would still prefer
gen-interface over gen-class. This would allow you to
declare all the state-manipulation and -access methods you'd
need. Then you coul
e Eclipse
> licence, but CPL (for example rev 1193).
Not much I can do about that, but thanks for the report.
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this grou
On Sat, Jan 3, 2009 at 8:49 PM, Juergen Gmeiner
wrote:
>
> On Dec 13 2008, 6:04 am, Chouser wrote:
>
>> Please send in your Contributor Agreement so this patch
>> can be checked in.
>
> Oops, almost missed this, sorry.
>
> I did send the CA and I am even lis
he seq is
empty, the value 1 isn't computed:
user=> (-> (test-stack) (single-pop) (push-seq [9]) (single-pop)
(single-pop) (empty?))
(first 2 )
(rest after 2 )
false
> I wanted to avoid this extra evaluation, without introducing "delay"
> and "force" everywher
d;
>}
>}
>
> I've tested this a bit and it appears to work properly. Does this
> seem like a good idea?
It seems like a good idea to me.
Have you sent in your CA? See: http://clojure.org/contributing
--Chouser
--~--~-~--~~---
by with (doc condp)
--Chouser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to
clojure+uns
1 - 100 of 770 matches
Mail list logo