Abstract Wikipedia/Beta tutorial
This is a copy of the documentation on the Beta Wikifunctions site. |
This page offers incomplete guidance on how to navigate the early Beta of Wikifunctions.
How do I find a function?
[edit]Search doesn’t work yet. The best way to find out which functions exist and to find functions is to go to the list of functions, and select the function you want.
How do I run a function?
[edit]You go to a function page (e.g. here is the function page for the Boolean And function). On the right hand side you will find a header “Details”, and underneath a subheader “Evaluate Function”, and underneath a gray box that allows you to enter the necessary arguments for the function. Enter the arguments, and click on the button “Call Function”. The result should show up underneath.
How do I create a function?
[edit]First you need to create the function itself. Go to the page to create a function. Enter a name, the input types, the output type, and then publish the function.
How do I create a function implementation?
[edit]On the page of the function that you want to create an implementation for, you can switch into the tab Details, and click on the link “Create a new implementation”. Now you can choose whether you want to enter code, or a composition.
Code
[edit]For now, you need to enter a name for the implementation or you won’t be able to publish the implementation.
For entering an implementation in code follow of the existing examples for entering code:
Composition
[edit]For entering an implementation as a composition, follow the following recipe:
- Select the functions you want to call
- If you need an argument, first try selecting the option “arg” from the mode drop down
- In case that doesn’t work, select “argument reference” as the type
- Select the argument you need in the drop down
Check out this short video for guidance.
Ignore the buttons “Create Function” and “Create Type” at the bottom of the screen. If the “Publish” button is grayed out, check if you entered a name for the implementation. If you just did, the button sometimes does not update properly. In that case click somewhere else to change focus and update the button.
How to connect the implementation with the function?
[edit]Once the implementation is created, you need to connect the function with the implementation. For that, go to the function page, click on “Edit source”, click on the button “Fallback editor”, and then, under the heading “Implementation list’, click on the big plus, and choose the just created implementation. Click on “Publish”. Now you should be able to call the function from the function page.