In a new document, open a standard calculator page
Doc > 4:Insert > A: Program editor > 1: New
Name: Whatever you want as long as it's under 15(I think?) characters.
Type: Function (Default is program, change that!)
Library Access: LibPub (Show in Catalog) (Default is none, change that too!)
Press OK
You should see something like this:

Inside the brackets next to the name of your function (in mine, function. (very creative, I know)), define which variables you'll be using, separated by commas.
For example, let's say 'function' is actually heron's rule:
Heron's rule has four variables (but really three), like i've written below:
(s-b)(s-c)})
, where

so you can simply copy that expression (not the equation, leave the = out) into the dotted box between Func and EndFunc:

After that, do Menu > 2: Check syntax & store > 1:Check syntax and store
(alternatively, Ctrl + B)
You can test your function on the calculator page. Once you know it works,
save your document in your MyLib folder, anywhere else (as far as I've tried, but I haven't tried much

) can cause issues and/or not work at all.
Finally (well, almost finally), press home and and go to your documents (Home > 2:My Documents). In there, press:
Menu > B: Refresh Libraries.
To test your function (and access it in general

) go to any calculator document (scratchpad works too) and open your catalogue (the book button) and then press 6 (or navigate to the books icon in the catalogue window) you should find your function in a folder-style drop down menu that has the name of your document. Usage should be the same as in the original document.
A couple of notes:
* You can store multiple functions in one document
* You should probably have a variable-order convention or a list of usage of each function in your summary because it can get confusing (I'm looking at you, Geo and trig) and the last thing you want is to enter the wrong thing in the wrong place and, would you believe, get the wrong answer.
* You need to refresh your libraries every time you add something to your document
Edit: Lists still don't work? Rip