Function Resource

AssociationSharpen

Sharpen the ends of an association

ResourceFunction["AssociationSharpen"][assoc]

makes the Association assoc sharper.

ResourceFunction["AssociationSharpen"][assoc,n]

makes it n times sharper.

Details and Options

CAUTION! Sharpened associations are sharp.

Examples

Basic Examples (1) 

Make an Association sharper:

In[1]:=
ResourceFunction[
 "https://www.wolframcloud.com/obj/bobs/DeployedResources/Function/\
AssociationSharpen"][<|"a" -> 1|>]
Out[1]=

Even sharper! OUCH!

In[2]:=
ResourceFunction[
 "https://www.wolframcloud.com/obj/bobs/DeployedResources/Function/\
AssociationSharpen"][<|"a" -> 1|>, 5]
Out[2]=

Scope (2) 

Create a sharp association:

In[3]:=
sharp = ResourceFunction[
  "https://www.wolframcloud.com/obj/bobs/DeployedResources/Function/\
AssociationSharpen"][<|"a" -> 1|>, 10]
Out[3]=

Copy the output, carefully. It still works:

In[4]:=
Association["a" -> 1]["a"]
Out[4]=