On Thursday 04 December 2008 23:23, Meikel Brandmeyer wrote:
> Hi,
>
> On 5 Dez., 00:38, Randall R Schulz <[EMAIL PROTECTED]> wrote:
> > ...
> ...
>
> > And am I mistaken in my reading of the API docs for (defmulti ...)
> > and (defmethod ...) or is there no accommodation in either for
> > doc-str
Hi,
On 5 Dez., 00:38, Randall R Schulz <[EMAIL PROTECTED]> wrote:
> Actually, I think each arity overload of a function deserves to be
> independently documentable, just as each overload of a method name in a
> Java class would be.
I disagree. If the function of the function changes that much, t
On Thu, Dec 4, 2008 at 6:45 PM, Mon Key <[EMAIL PROTECTED]> wrote:
>
> So, is it idiomatic Clojure to wrap docstring in a #^{}?
>
> e.g. is this considered bad form:
>
> (defn foo
> "naked docstring is ok, but rather bad form while still nice for the
> relative terseness of format"
> [x]
> (+ x 1)
> This doesn't work well with Clojure, because you can have
> multiple argument vectors:
>
> (defn foo
>"docstring here"
>([x] (do-something-with-one-arg x))
>([x y] (we-can-also-do-two x y)))
>
> Behind which arglist should we put the docstring. ;)
That makes perfect sense, this is
On Thursday 04 December 2008 14:41, Meikel Brandmeyer wrote:
> Hi,
>
> Am 04.12.2008 um 18:30 schrieb Mon Key:
> > It looks like I was getting turned around by the implicit do (and
> > by my preconceptions coming from other Lisps where the docstring
> > likes to sit behind the arglist)
>
> This do
Hi,
Am 04.12.2008 um 18:30 schrieb Mon Key:
It looks like I was getting turned around by the implicit do (and by
my preconceptions coming from other Lisps where the docstring likes to
sit behind the arglist)
This doesn't work well with Clojure, because you can have
multiple argument vectors:
> The part after the argument vector goes into the function body, which
> is wrapped in a do. do evaluates the expressions and returns the
> value of the last one. The results of evaluating the other expressions
> are discarded.
Ok. That provides the clarity I was after. Thank You.
It looks li
> I can understand cases for passing the empty string, the empty list,
> etc. However, I have trouble understanding how it isn't an error/
> exception to pass a non-empty string after the param list and have
> that string be converted to nil.
You are not "passing a non-empty string", you are inc
Hi,
On 4 Dez., 07:53, Mon Key <[EMAIL PROTECTED]> wrote:
> So, in the case where the (doc)string is placed after the param I
> should expect that REPL reads that string but doesn't necesarily
> evaluate it? Where does that string go? Does it become nil? It
> wasn't passed as a nil anymore than
So, in the case where the (doc)string is placed after the param I
should expect that REPL reads that string but doesn't necesarily
evaluate it? Where does that string go? Does it become nil? It
wasn't passed as a nil anymore than it was passed as a docstring.
If i didn't intend the (doc)string
On Dec 4, 2008, at 12:57 AM, Mon Key wrote:
> I'm sure I'm missing something
>
> Maybe I should re address the issue in a different way; outside of
> `meta' what other way is there to do a *visual* check/comparison to
> test if two otherwise identical and/or nearly identical symbols
> contain
I forgot to add the evaluations of my-test to itself
;;; ===
;;; evaluating my-test with doc string *after* param
;;; ===
user> my-test
#
;;; ===
;;; ===
;;; evaluating my-test with doc string *before* param
;;;
I'm sure I'm missing something
Maybe I should re address the issue in a different way; outside of
`meta' what other way is there to do a *visual* check/comparison to
test if two otherwise identical and/or nearly identical symbols
contain identical slot values?
In the case where the `doc' str
On Dec 3, 2008, at 11:35 PM, Mon Key wrote:
> I apologize if this has been brought up before... But, where does
> the doc string on the `my-test' defn below reside.
It becomes metadata for the var that your defn form defines. You can
see all the metadata with (meta (var my-test)).
> If not,
14 matches
Mail list logo