good suggestions guys!! thx so much
On Sep 2, 10:44 am, Justin Kramer wrote:
> A couple other things:
> 1) (apply identity ...) is the same as (first ...)
> 2) Consider using the ->> macro to clean up the let
>
> Here's a quick rewrite:
>
> (defn make-target
> ([file channel sweepidx]
> (
On Thu, 2 Sep 2010 05:54:26 -0700 (PDT)
Glen Rubin wrote:
> I defined a fn whose execution depends on the number of parameters
> passed to it. It works fine! I am just concerned that I am doing
> this in a way that is not as concise as it could or should be. Here
> is my fn:
>
> (defn make-ta
A couple other things:
1) (apply identity ...) is the same as (first ...)
2) Consider using the ->> macro to clean up the let
Here's a quick rewrite:
(defn make-target
([file channel sweepidx]
(make-target file channel sweepidx 0))
([file channel sweepidx startidx]
(make-target file
Hello Glen,
I'd use the first two forms to set startidx and size and then call the
"full" form:
(def inf java.lang.Double/POSITIVE_INFINITY)
(defn make-target
"Parses text file for single sweep specified by sweepidx. If size
is
not specified will parse till end of sweep. If startidx and si
I defined a fn whose execution depends on the number of parameters
passed to it. It works fine! I am just concerned that I am doing
this in a way that is not as concise as it could or should be. Here
is my fn:
(defn make-target
"Parses text file for single sweep specified by sweepidx. If size