Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion anonymous functions with names

Received: by 10.58.190.227 with SMTP id gt3mr4481095vec.1.1346664628948;
        Mon, 03 Sep 2012 02:30:28 -0700 (PDT)
X-BeenThere: clojure@googlegroups.com
Received: by 10.52.73.72 with SMTP id j8ls4208636vdv.7.gmail; Mon, 03 Sep 2012
 02:30:22 -0700 (PDT)
Received: by 10.52.91.47 with SMTP id cb15mr2018917vdb.11.1346664622099;
        Mon, 03 Sep 2012 02:30:22 -0700 (PDT)
Date: Mon, 3 Sep 2012 02:30:21 -0700 (PDT)
From: dmirylenka <daniilmirile...@gmail.com>
To: clojure@googlegroups.com
Cc: er...@erlisvidal.com
Message-Id: <d2da79d4-708b-4583-989c-0b65cf2463bd@googlegroups.com>
In-Reply-To: <CAM_MUNna9Zp-+S9fL-6u3+AYRJpZ-4ZBsH8GJg39RuAMP8G0mw@mail.gmail.com>
References: <CAM_MUNna9Zp-+S9fL-6u3+AYRJpZ-4ZBsH8GJg39RuAMP8G0mw@mail.gmail.com>
Subject: Re: anonymous functions with names
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_152_23125700.1346664621667"

------=_Part_152_23125700.1346664621667
Content-Type: multipart/alternative; 
	boundary="----=_Part_153_12662103.1346664621667"

------=_Part_153_12662103.1346664621667
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Just 2 cents:

A name you give to the anonymous function also appears in the stack traces 
instead of the things like fn_123_4532,
which is very convenient for debugging.

On Friday, August 31, 2012 5:52:55 PM UTC+2, Erlis Vidal wrote:
>
> Hi guys, 
>
> I've been reading but I'm still confused about the difference between an 
> anonymous function with name vs a defn function
>
> (fn my-func1[x] x)
>
> (defn my-func2[x] x)
>
> Thanks, 
> Erlis 
>

------=_Part_153_12662103.1346664621667
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

Just 2 cents:<div><br></div><div>A name you give to the anonymous function also appears in the stack traces instead of the things like fn_123_4532,</div><div>which is very convenient for debugging.</div><div><div><br>On Friday, August 31, 2012 5:52:55 PM UTC+2, Erlis Vidal wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi guys,&nbsp;<div><br></div><div>I've been reading but I'm still confused about the difference between an anonymous function with name vs a defn function</div><div><br></div><div>(fn my-func1[x] x)</div><div><br></div>

<div>(defn my-func2[x] x)</div><div><br></div><div>Thanks,&nbsp;</div><div>Erlis&nbsp;</div>
</blockquote></div></div>
------=_Part_153_12662103.1346664621667--

------=_Part_152_23125700.1346664621667--