Basic Examples (2)
Basic Examples
(2)
Create a paclet from a function:
In[1]:=
HalfSquared[x_]:=(x/2)^2dir=["HalfSquare",{"HalfSquared"}]
Out[1]=
/private/var/folders/1n/hkc4vnx96wb3xs7g7mfcm5y4000c4m/T/m000003369641
Clear the local function definition and add register the paclet:
In[2]:=
Clear[HalfSquared];PacletManager`PacletDirectoryAdd[dir];
The function will autoload the paclet and work:
In[3]:=
HalfSquared[10]
Out[3]=
25
———
Create a paclet layout in a specific location:
In[1]:=
DoubleSpooky[x_]:=Nest[ResourceFunction["Spookify"],SpeechSynthesize[x],2]dir=["DoubleSpooky","DoubleSpooky","ScaryStuff/SpookyPaclet"]
Out[1]=
ScaryStuff/SpookyPaclet
In[2]:=
PacletDirectoryAdd[dir];
I made this on the spookiest day:
In[3]:=
Today->DoubleSpooky@DateString[Today,{"DayName"," the ","Day","th"}]
Out[3]=
Scope (7)
Scope
(7)
Properties and Relations (1)
Properties and Relations
(1)