I've always liked the way assoc and dissoc return the original map instance
when there's no change to be made. But this is not apparently true of
records. e.g.:
> (def m {:a 1})
> (identical? m (dissoc m :x))
; true
> (def r <>)
> (identical? r (dissoc r :x))
; false
Does anyone know if there'
On 20 April 2012 07:08, Matthew Phillips wrote:
> I've always liked the way assoc and dissoc return the original map
> instance when there's no change to be made. But this is not apparently
> true of records. e.g.:
Out of curiosity, why is this useful to you?
I would imagine that the fact that
On Thu, Apr 19, 2012 at 11:31 PM, David Jagoe wrote:
>
> Out of curiosity, why is this useful to you?
>
It certainly has performance benefits.
When things are tested for equality (e.g., to test against keys in a hash
map), identical things are the fastest to recognize as equal. Also, saves
on
On 20 April 2012 07:38, Mark Engelberg wrote:
> On Thu, Apr 19, 2012 at 11:31 PM, David Jagoe wrote:
>
>>
>> Out of curiosity, why is this useful to you?
>>
>
> It certainly has performance benefits.
>
> When things are tested for equality (e.g., to test against keys in a hash
> map), identical t
Calls to = call identity? first.
On Fri, Apr 20, 2012 at 2:38 AM, Mark Engelberg wrote:
> On Thu, Apr 19, 2012 at 11:31 PM, David Jagoe wrote:
>
>>
>> Out of curiosity, why is this useful to you?
>>
>
> It certainly has performance benefits.
>
> When things are tested for equality (e.g., to test
On Friday, April 20, 2012 4:01:54 PM UTC+9:30, David Jagoe wrote:
>
>
> On 20 April 2012 07:08, Matthew Phillips wrote:
>
>> I've always liked the way assoc and dissoc return the original map
>> instance when there's no change to be made. But this is not apparently
>> true of records. e.g.:
>
>